From 7e80dce43d26c17ad1d3918e68b69001c99885d9 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 21 Nov 2021 18:31:42 +0100 Subject: [PATCH 1/3] bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE --- Modules/Setup.stdlib.in | 6 +++ configure | 108 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 6 +++ setup.py | 16 +++--- 4 files changed, 126 insertions(+), 10 deletions(-) diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index bf414410d4b769..07e545afa53362 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -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 diff --git a/configure b/configure index 6aea5b6b77e560..2c6beb1ac1b0c9 100755 --- a/configure +++ b/configure @@ -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 @@ -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 @@ -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='#' @@ -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='#' @@ -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='#' @@ -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='#' @@ -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='#' @@ -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 @@ -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 diff --git a/configure.ac b/configure.ac index 925d7f9f575c8c..1e9c1c16802481 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/setup.py b/setup.py index a76df82c1b7420..7aae46ab47a79b 100644 --- a/setup.py +++ b/setup.py @@ -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 From 4b6fb76eaa1fa7214661eeedd355f6924a10dbeb Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Mon, 22 Nov 2021 10:23:54 +0100 Subject: [PATCH 2/3] Address review --- Modules/Setup.stdlib.in | 2 +- configure | 152 +++++++++++++++++++++------------------- configure.ac | 12 ++-- 3 files changed, 87 insertions(+), 79 deletions(-) diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index 07e545afa53362..5e28a72d7a1628 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -39,13 +39,13 @@ @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 @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 diff --git a/configure b/configure index 2c6beb1ac1b0c9..2cdc899082bfaf 100755 --- a/configure +++ b/configure @@ -688,12 +688,18 @@ MODULE_OSSAUDIODEV_FALSE MODULE_OSSAUDIODEV_TRUE MODULE_GRP_FALSE MODULE_GRP_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__STATISTICS_FALSE -MODULE__STATISTICS_TRUE MODULE__RANDOM_FALSE MODULE__RANDOM_TRUE MODULE__QUEUE_FALSE @@ -702,20 +708,14 @@ 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 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 @@ -19634,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='#' @@ -19660,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='#' @@ -19710,20 +19682,6 @@ fi - 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__OPCODE_TRUE= MODULE__OPCODE_FALSE='#' @@ -19772,6 +19730,31 @@ 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='#' +else + MODULE__ZONEINFO_TRUE='#' + MODULE__ZONEINFO_FALSE= +fi + + + + + + if true; then MODULE__STATISTICS_TRUE= MODULE__STATISTICS_FALSE='#' @@ -19782,30 +19765,51 @@ fi + as_fn_append MODULE_BLOCK "MODULE__STATISTICS_LDFLAGS=$LIBM$as_nl" + if true; then - MODULE__TYPING_TRUE= - MODULE__TYPING_FALSE='#' + MODULE_CMATH_TRUE= + MODULE_CMATH_FALSE='#' else - MODULE__TYPING_TRUE='#' - MODULE__TYPING_FALSE= + MODULE_CMATH_TRUE='#' + MODULE_CMATH_FALSE= fi + as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl" + if true; then - MODULE__ZONEINFO_TRUE= - MODULE__ZONEINFO_FALSE='#' + MODULE_MATH_TRUE= + MODULE_MATH_FALSE='#' else - MODULE__ZONEINFO_TRUE='#' - MODULE__ZONEINFO_FALSE= + 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" + @@ -20985,18 +20989,10 @@ 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 @@ -21009,10 +21005,6 @@ 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 @@ -21029,10 +21021,6 @@ 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 @@ -21041,6 +21029,22 @@ if test -z "${MODULE__ZONEINFO_TRUE}" && test -z "${MODULE__ZONEINFO_FALSE}"; th 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 diff --git a/configure.ac b/configure.ac index 1e9c1c16802481..ee379b71417c75 100644 --- a/configure.ac +++ b/configure.ac @@ -6078,21 +6078,25 @@ 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 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], From e64aff94c14dff257221d128b13676555e665afd Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Mon, 22 Nov 2021 10:32:01 +0100 Subject: [PATCH 3/3] Addres review --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 7aae46ab47a79b..91040171a494b2 100644 --- a/setup.py +++ b/setup.py @@ -1019,8 +1019,10 @@ def detect_simple_extensions(self): # static Unicode character database self.addext(Extension('unicodedata', ['unicodedata.c'])) self.addext(Extension('_opcode', ['_opcode.c'])) + # asyncio speedups self.addext(Extension("_asyncio", ["_asynciomodule.c"])) + self.addext(Extension("_queue", ["_queuemodule.c"])) self.addext(Extension("_statistics", ["_statisticsmodule.c"])) self.addext(Extension("_typing", ["_typingmodule.c"]))