mirror of
https://github.com/python/cpython
synced 2024-09-05 08:17:45 +00:00
bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE (GH-29690)
Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
512dbf6f56
commit
39f7d2ff01
|
@ -29,17 +29,23 @@
|
|||
############################################################################
|
||||
# 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__TYPING_TRUE@_typing _typingmodule.c
|
||||
@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c
|
||||
|
||||
# needs libm
|
||||
@MODULE_MATH_TRUE@math mathmodule.c
|
||||
@MODULE_CMATH_TRUE@cmath cmathmodule.c
|
||||
@MODULE__STATISTICS_TRUE@_statistics _statisticsmodule.c
|
||||
|
||||
# needs libm and on some platforms librt
|
||||
@MODULE__DATETIME_TRUE@_datetime _datetimemodule.c
|
||||
|
|
218
configure
vendored
218
configure
vendored
|
@ -688,26 +688,38 @@ MODULE_OSSAUDIODEV_FALSE
|
|||
MODULE_OSSAUDIODEV_TRUE
|
||||
MODULE_GRP_FALSE
|
||||
MODULE_GRP_TRUE
|
||||
MODULE__ZONEINFO_FALSE
|
||||
MODULE__ZONEINFO_TRUE
|
||||
MODULE__RANDOM_FALSE
|
||||
MODULE__RANDOM_TRUE
|
||||
MODULE__PICKLE_FALSE
|
||||
MODULE__PICKLE_TRUE
|
||||
MODULE__DATETIME_FALSE
|
||||
MODULE__DATETIME_TRUE
|
||||
MODULE_MATH_FALSE
|
||||
MODULE_MATH_TRUE
|
||||
MODULE_CMATH_FALSE
|
||||
MODULE_CMATH_TRUE
|
||||
MODULE__STATISTICS_FALSE
|
||||
MODULE__STATISTICS_TRUE
|
||||
MODULE__ZONEINFO_FALSE
|
||||
MODULE__ZONEINFO_TRUE
|
||||
MODULE__TYPING_FALSE
|
||||
MODULE__TYPING_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__LSPROF_FALSE
|
||||
MODULE__LSPROF_TRUE
|
||||
MODULE__JSON_FALSE
|
||||
MODULE__JSON_TRUE
|
||||
MODULE__HEAPQ_FALSE
|
||||
MODULE__HEAPQ_TRUE
|
||||
MODULE__DATETIME_FALSE
|
||||
MODULE__DATETIME_TRUE
|
||||
MODULE__CONTEXTVARS_FALSE
|
||||
MODULE__CONTEXTVARS_TRUE
|
||||
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
|
||||
|
@ -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='#'
|
||||
|
@ -19610,20 +19634,6 @@ fi
|
|||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE_CMATH_TRUE=
|
||||
MODULE_CMATH_FALSE='#'
|
||||
else
|
||||
MODULE_CMATH_TRUE='#'
|
||||
MODULE_CMATH_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__CONTEXTVARS_TRUE=
|
||||
MODULE__CONTEXTVARS_FALSE='#'
|
||||
|
@ -19636,20 +19646,6 @@ fi
|
|||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__DATETIME_TRUE=
|
||||
MODULE__DATETIME_FALSE='#'
|
||||
else
|
||||
MODULE__DATETIME_TRUE='#'
|
||||
MODULE__DATETIME_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE__DATETIME_LDFLAGS=$TIMEMODULE_LIB $LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__HEAPQ_TRUE=
|
||||
MODULE__HEAPQ_FALSE='#'
|
||||
|
@ -19675,16 +19671,26 @@ fi
|
|||
|
||||
|
||||
if true; then
|
||||
MODULE_MATH_TRUE=
|
||||
MODULE_MATH_FALSE='#'
|
||||
MODULE__LSPROF_TRUE=
|
||||
MODULE__LSPROF_FALSE='#'
|
||||
else
|
||||
MODULE_MATH_TRUE='#'
|
||||
MODULE_MATH_FALSE=
|
||||
MODULE__LSPROF_TRUE='#'
|
||||
MODULE__LSPROF_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE_MATH_LDFLAGS=$LIBM$as_nl"
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__OPCODE_TRUE=
|
||||
MODULE__OPCODE_FALSE='#'
|
||||
else
|
||||
MODULE__OPCODE_TRUE='#'
|
||||
MODULE__OPCODE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -19700,6 +19706,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='#'
|
||||
|
@ -19712,6 +19730,18 @@ 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='#'
|
||||
|
@ -19725,6 +19755,64 @@ fi
|
|||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__STATISTICS_TRUE=
|
||||
MODULE__STATISTICS_FALSE='#'
|
||||
else
|
||||
MODULE__STATISTICS_TRUE='#'
|
||||
MODULE__STATISTICS_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE__STATISTICS_LDFLAGS=$LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE_CMATH_TRUE=
|
||||
MODULE_CMATH_FALSE='#'
|
||||
else
|
||||
MODULE_CMATH_TRUE='#'
|
||||
MODULE_CMATH_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE_MATH_TRUE=
|
||||
MODULE_MATH_FALSE='#'
|
||||
else
|
||||
MODULE_MATH_TRUE='#'
|
||||
MODULE_MATH_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE_MATH_LDFLAGS=$LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__DATETIME_TRUE=
|
||||
MODULE__DATETIME_FALSE='#'
|
||||
else
|
||||
MODULE__DATETIME_TRUE='#'
|
||||
MODULE__DATETIME_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE__DATETIME_LDFLAGS=$TIMEMODULE_LIB $LIBM$as_nl"
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module grp" >&5
|
||||
$as_echo_n "checking for stdlib extension module grp... " >&6; }
|
||||
case $py_stdlib_not_available in #(
|
||||
|
@ -20893,22 +20981,18 @@ 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
|
||||
fi
|
||||
if test -z "${MODULE_CMATH_TRUE}" && test -z "${MODULE_CMATH_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE_CMATH\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MODULE__CONTEXTVARS_TRUE}" && test -z "${MODULE__CONTEXTVARS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE__CONTEXTVARS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MODULE__DATETIME_TRUE}" && test -z "${MODULE__DATETIME_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE__DATETIME\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MODULE__HEAPQ_TRUE}" && test -z "${MODULE__HEAPQ_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE__HEAPQ\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
@ -20917,22 +21001,50 @@ 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_MATH_TRUE}" && test -z "${MODULE_MATH_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE_MATH\" was never defined.
|
||||
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__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__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
|
||||
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_CMATH_TRUE}" && test -z "${MODULE_CMATH_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE_CMATH\" 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__DATETIME_TRUE}" && test -z "${MODULE__DATETIME_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE__DATETIME\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MODULE_GRP_TRUE}" && test -z "${MODULE_GRP_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MODULE_GRP\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -6076,17 +6076,27 @@ 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([math], [], [$LIBM])
|
||||
PY_STDLIB_MOD_SIMPLE([_lsprof])
|
||||
PY_STDLIB_MOD_SIMPLE([_opcode])
|
||||
PY_STDLIB_MOD_SIMPLE([_pickle])
|
||||
PY_STDLIB_MOD_SIMPLE([_queue])
|
||||
PY_STDLIB_MOD_SIMPLE([_random])
|
||||
PY_STDLIB_MOD_SIMPLE([_typing])
|
||||
PY_STDLIB_MOD_SIMPLE([_zoneinfo])
|
||||
|
||||
dnl needs libm
|
||||
PY_STDLIB_MOD_SIMPLE([_statistics], [], [$LIBM])
|
||||
PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
|
||||
PY_STDLIB_MOD_SIMPLE([math], [], [$LIBM])
|
||||
|
||||
dnl needs libm and on some platforms librt
|
||||
PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
|
||||
|
||||
dnl platform specific extensions
|
||||
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
|
||||
PY_STDLIB_MOD([ossaudiodev],
|
||||
|
|
18
setup.py
18
setup.py
|
@ -1015,19 +1015,17 @@ 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
|
||||
|
|
Loading…
Reference in a new issue