8000 bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE by erlend-aasland · Pull Request #29690 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE #29690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and …
…_typing to PY_STDLIB_MOD_SIMPLE
  • Loading branch information
Erlend E. Aasland committed Nov 22, 2021
commit 7e80dce43d26c17ad1d3918e68b69001c99885d9
6 changes: 6 additions & 0 deletions Modules/Setup.stdlib.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@
############################################################################
# Modules that should always be present (POSIX and Windows):
@MODULE_ARRAY_TRUE@array arraymodule.c
@MODULE__ASYNCIO_TRUE@_asyncio _asynciomodule.c
@MODULE__BISECT_TRUE@_bisect _bisectmodule.c
@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
@MODULE__HEAPQ_TRUE@_heapq _heapqmodule.c
@MODULE__JSON_TRUE@_json _json.c
@MODULE__LSPROF_TRUE@_lsprof _lsprof.c rotatingtree.c
@MODULE__OPCODE_TRUE@_opcode _opcode.c
@MODULE__PICKLE_TRUE@_pickle _pickle.c
@MODULE__QUEUE_TRUE@_queue _queuemodule.c
@MODULE__RANDOM_TRUE@_random _randommodule.c
@MODULE__STATISTICS_TRUE@_statistics _statisticsmodule.c
@MODULE__TYPING_TRUE@_typing _typingmodule.c
@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c

# needs libm
Expand Down
108 changes: 108 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,22 @@ MODULE_GRP_FALSE
MODULE_GRP_TRUE
MODULE__ZONEINFO_FALSE
MODULE__ZONEINFO_TRUE
MODULE__TYPING_FALSE
MODULE__TYPING_TRUE
MODULE__STATISTICS_FALSE
MODULE__STATISTICS_TRUE
MODULE__RANDOM_FALSE
MODULE__RANDOM_TRUE
MODULE__QUEUE_FALSE
MODULE__QUEUE_TRUE
MODULE__PICKLE_FALSE
MODULE__PICKLE_TRUE
MODULE__OPCODE_FALSE
MODULE__OPCODE_TRUE
MODULE_MATH_FALSE
MODULE_MATH_TRUE
MODULE__LSPROF_FALSE
MODULE__LSPROF_TRUE
MODULE__JSON_FALSE
MODULE__JSON_TRUE
MODULE__HEAPQ_FALSE
Expand All @@ -708,6 +718,8 @@ MODULE_CMATH_FALSE
MODULE_CMATH_TRUE
MODULE__BISECT_FALSE
MODULE__BISECT_TRUE
MODULE__ASYNCIO_FALSE
MODULE__ASYNCIO_TRUE
MODULE_ARRAY_FALSE
MODULE_ARRAY_TRUE
MODULE_TIME_FALSE
Expand Down Expand Up @@ -19598,6 +19610,18 @@ fi



if true; then
MODULE__ASYNCIO_TRUE=
MODULE__ASYNCIO_FALSE='#'
else
MODULE__ASYNCIO_TRUE='#'
MODULE__ASYNCIO_FALSE=
fi





if true; then
MODULE__BISECT_TRUE=
MODULE__BISECT_FALSE='#'
Expand Down Expand Up @@ -19674,6 +19698,18 @@ fi



if true; then
MODULE__LSPROF_TRUE=
MODULE__LSPROF_FALSE='#'
else
MODULE__LSPROF_TRUE='#'
MODULE__LSPROF_FALSE=
fi





if true; then
MODULE_MATH_TRUE=
MODULE_MATH_FALSE='#'
Expand All @@ -19688,6 +19724,18 @@ fi



if true; then
MODULE__OPCODE_TRUE=
MODULE__OPCODE_FALSE='#'
else
MODULE__OPCODE_TRUE='#'
MODULE__OPCODE_FALSE=
fi





if true; then
MODULE__PICKLE_TRUE=
MODULE__PICKLE_FALSE='#'
Expand All @@ -19700,6 +19748,18 @@ fi



if true; then
MODULE__QUEUE_TRUE=
MODULE__QUEUE_FALSE='#'
else
MODULE__QUEUE_TRUE='#'
MODULE__QUEUE_FALSE=
fi





if true; then
MODULE__RANDOM_TRUE=
MODULE__RANDOM_FALSE='#'
Expand All @@ -19712,6 +19772,30 @@ fi



if true; then
MODULE__STATISTICS_TRUE=
MODULE__STATISTICS_FALSE='#'
else
MODULE__STATISTICS_TRUE='#'
MODULE__STATISTICS_FALSE=
fi





if true; then
MODULE__TYPING_TRUE=
MODULE__TYPING_FALSE='#'
else
MODULE__TYPING_TRUE='#'
MODULE__TYPING_FALSE=
fi





if true; then
MODULE__ZONEINFO_TRUE=
MODULE__ZONEINFO_FALSE='#'
Expand Down Expand Up @@ -20893,6 +20977,10 @@ if test -z "${MODULE_ARRAY_TRUE}" && test -z "${MODULE_ARRAY_FALSE}"; then
as_fn_error $? "conditional \"MODULE_ARRAY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__ASYNCIO_TRUE}" && test -z "${MODULE__ASYNCIO_FALSE}"; then
as_fn_error $? "conditional \"MODULE__ASYNCIO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__BISECT_TRUE}" && test -z "${MODULE__BISECT_FALSE}"; then
as_fn_error $? "conditional \"MODULE__BISECT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand All @@ -20917,18 +21005,38 @@ if test -z "${MODULE__JSON_TRUE}" && test -z "${MODULE__JSON_FALSE}"; then
as_fn_error $? "conditional \"MODULE__JSON\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__LSPROF_TRUE}" && test -z "${MODULE__LSPROF_FALSE}"; then
as_fn_error $? "conditional \"MODULE__LSPROF\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE_MATH_TRUE}" && test -z "${MODULE_MATH_FALSE}"; then
as_fn_error $? "conditional \"MODULE_MATH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__OPCODE_TRUE}" && test -z "${MODULE__OPCODE_FALSE}"; then
as_fn_error $? "conditional \"MODULE__OPCODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__PICKLE_TRUE}" && test -z "${MODULE__PICKLE_FALSE}"; then
as_fn_error $? "conditional \"MODULE__PICKLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__QUEUE_TRUE}" && test -z "${MODULE__QUEUE_FALSE}"; then
as_fn_error $? "conditional \"MODULE__QUEUE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__RANDOM_TRUE}" && test -z "${MODULE__RANDOM_FALSE}"; then
as_fn_error $? "conditional \"MODULE__RANDOM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__STATISTICS_TRUE}" && test -z "${MODULE__STATISTICS_FALSE}"; then
as_fn_error $? "conditional \"MODULE__STATISTICS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__TYPING_TRUE}" && test -z "${MODULE__TYPING_FALSE}"; then
as_fn_error $? "conditional \"MODULE__TYPING\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__ZONEINFO_TRUE}" && test -z "${MODULE__ZONEINFO_FALSE}"; then
as_fn_error $? "conditional \"MODULE__ZONEINFO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6076,15 +6076,21 @@ PY_STDLIB_MOD_SIMPLE([time], [], [$TIMEMODULE_LIB])

dnl always enabled extension modules
PY_STDLIB_MOD_SIMPLE([array])
PY_STDLIB_MOD_SIMPLE([_asyncio])
PY_STDLIB_MOD_SIMPLE([_bisect])
PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
PY_STDLIB_MOD_SIMPLE([_contextvars])
PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
PY_STDLIB_MOD_SIMPLE([_heapq])
PY_STDLIB_MOD_SIMPLE([_json])
PY_STDLIB_MOD_SIMPLE([_lsprof])
PY_STDLIB_MOD_SIMPLE([math], [], [$LIBM])
PY_STDLIB_MOD_SIMPLE([_opcode])
PY_STDLIB_MOD_SIMPLE([_pickle])
PY_STDLIB_MOD_SIMPLE([_queue])
PY_STDLIB_MOD_SIMPLE([_random])
PY_STDLIB_MOD_SIMPLE([_statistics])
PY_STDLIB_MOD_SIMPLE([_typing])
PY_STDLIB_MOD_SIMPLE([_zoneinfo])

dnl platform specific extensions
Expand Down
16 changes: 6 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,19 +1015,15 @@ def detect_simple_extensions(self):
self.addext(Extension("_json", ["_json.c"]))

# profiler (_lsprof is for cProfile.py)
self.add(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))
self.addext(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))
# static Unicode character database
self.addext(Extension('unicodedata', ['unicodedata.c']))
# _opcode module
self.add(Extension('_opcode', ['_opcode.c']))
self.addext(Extension('_opcode', ['_opcode.c']))
# asyncio speedups
self.add(Extension("_asyncio", ["_asynciomodule.c"]))
# _queue module
self.add(Extension("_queue", ["_queuemodule.c"]))
# _statistics module
self.add(Extension("_statistics", ["_statisticsmodule.c"]))
# _typing module
self.add(Extension("_typing", ["_typingmodule.c"]))
self.addext(Extension("_asyncio", ["_asynciomodule.c"]))
self.addext(Extension("_queue", ["_queuemodule.c"]))
self.addext(Extension("_statistics", ["_statisticsmodule.c"]))
self.addext(Extension("_typing", ["_typingmodule.c"]))

# Modules with some UNIX dependencies -- on by default:
# (If you have a really backward UNIX, select and socket may not be
Expand Down
0