diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index 8ab93704765a5c..0688c350db2389 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -32,6 +32,7 @@ @MODULE__ASYNCIO_TRUE@_asyncio _asynciomodule.c @MODULE__BISECT_TRUE@_bisect _bisectmodule.c @MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c +@MODULE__CSV_TRUE@_csv _csv.c @MODULE__HEAPQ_TRUE@_heapq _heapqmodule.c @MODULE__JSON_TRUE@_json _json.c @MODULE__LSPROF_TRUE@_lsprof _lsprof.c rotatingtree.c @@ -44,6 +45,7 @@ @MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c # needs libm +@MODULE_AUDIOOP_TRUE@audioop audioop.c @MODULE_MATH_TRUE@math mathmodule.c @MODULE_CMATH_TRUE@cmath cmathmodule.c @MODULE__STATISTICS_TRUE@_statistics _statisticsmodule.c @@ -103,6 +105,7 @@ @MODULE_NIS_TRUE@nis nismodule.c # needs sys/soundcard.h or linux/soundcard.h (Linux, FreeBSD) @MODULE_OSSAUDIODEV_TRUE@ossaudiodev ossaudiodev.c +@MODULE__POSIXSUBPROCESS_TRUE@_posixsubprocess _posixsubprocess.c @MODULE_RESOURCE_TRUE@resource resource.c @MODULE_SELECT_TRUE@select selectmodule.c # AIX has shadow passwords, but does not provide getspent API diff --git a/configure b/configure index dd2e3b8ff4d765..193d6b9179b754 100755 --- a/configure +++ b/configure @@ -710,6 +710,8 @@ MODULE_CMATH_FALSE MODULE_CMATH_TRUE MODULE__STATISTICS_FALSE MODULE__STATISTICS_TRUE +MODULE_AUDIOOP_FALSE +MODULE_AUDIOOP_TRUE MODULE__ZONEINFO_FALSE MODULE__ZONEINFO_TRUE MODULE__XXSUBINTERPRETERS_FALSE @@ -722,6 +724,8 @@ MODULE__RANDOM_FALSE MODULE__RANDOM_TRUE MODULE__QUEUE_FALSE MODULE__QUEUE_TRUE +MODULE__POSIXSUBPROCESS_FALSE +MODULE__POSIXSUBPROCESS_TRUE MODULE__PICKLE_FALSE MODULE__PICKLE_TRUE MODULE__OPCODE_FALSE @@ -732,6 +736,8 @@ MODULE__JSON_FALSE MODULE__JSON_TRUE MODULE__HEAPQ_FALSE MODULE__HEAPQ_TRUE +MODULE__CSV_FALSE +MODULE__CSV_TRUE MODULE__CONTEXTVARS_FALSE MODULE__CONTEXTVARS_TRUE MODULE__BISECT_FALSE @@ -20475,6 +20481,15 @@ else fi as_fn_append MODULE_BLOCK "MODULE__CONTEXTVARS=yes$as_nl" + if true; then + MODULE__CSV_TRUE= + MODULE__CSV_FALSE='#' +else + MODULE__CSV_TRUE='#' + MODULE__CSV_FALSE= +fi + as_fn_append MODULE_BLOCK "MODULE__CSV=yes$as_nl" + if true; then MODULE__HEAPQ_TRUE= MODULE__HEAPQ_FALSE='#' @@ -20520,6 +20535,15 @@ else fi as_fn_append MODULE_BLOCK "MODULE__PICKLE=yes$as_nl" + if true; then + MODULE__POSIXSUBPROCESS_TRUE= + MODULE__POSIXSUBPROCESS_FALSE='#' +else + MODULE__POSIXSUBPROCESS_TRUE='#' + MODULE__POSIXSUBPROCESS_FALSE= +fi + as_fn_append MODULE_BLOCK "MODULE__POSIXSUBPROCESS=yes$as_nl" + if true; then MODULE__QUEUE_TRUE= MODULE__QUEUE_FALSE='#' @@ -20575,6 +20599,17 @@ fi as_fn_append MODULE_BLOCK "MODULE__ZONEINFO=yes$as_nl" + if true; then + MODULE_AUDIOOP_TRUE= + MODULE_AUDIOOP_FALSE='#' +else + MODULE_AUDIOOP_TRUE='#' + MODULE_AUDIOOP_FALSE= +fi + as_fn_append MODULE_BLOCK "MODULE_AUDIOOP=yes$as_nl" + as_fn_append MODULE_BLOCK "MODULE_AUDIOOP_LDFLAGS=$LIBM$as_nl" + + if true; then MODULE__STATISTICS_TRUE= MODULE__STATISTICS_FALSE='#' @@ -21936,6 +21971,10 @@ if test -z "${MODULE__CONTEXTVARS_TRUE}" && test -z "${MODULE__CONTEXTVARS_FALSE 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__CSV_TRUE}" && test -z "${MODULE__CSV_FALSE}"; then + as_fn_error $? "conditional \"MODULE__CSV\" 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 @@ -21956,6 +21995,10 @@ 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__POSIXSUBPROCESS_TRUE}" && test -z "${MODULE__POSIXSUBPROCESS_FALSE}"; then + as_fn_error $? "conditional \"MODULE__POSIXSUBPROCESS\" 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 @@ -21980,6 +22023,10 @@ 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_AUDIOOP_TRUE}" && test -z "${MODULE_AUDIOOP_FALSE}"; then + as_fn_error $? "conditional \"MODULE_AUDIOOP\" 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 diff --git a/configure.ac b/configure.ac index 72f2def9b11af0..b48fa56d3998ee 100644 --- a/configure.ac +++ b/configure.ac @@ -6127,11 +6127,13 @@ PY_STDLIB_MOD_SIMPLE([array]) PY_STDLIB_MOD_SIMPLE([_asyncio]) PY_STDLIB_MOD_SIMPLE([_bisect]) PY_STDLIB_MOD_SIMPLE([_contextvars]) +PY_STDLIB_MOD_SIMPLE([_csv]) PY_STDLIB_MOD_SIMPLE([_heapq]) PY_STDLIB_MOD_SIMPLE([_json]) PY_STDLIB_MOD_SIMPLE([_lsprof]) PY_STDLIB_MOD_SIMPLE([_opcode]) PY_STDLIB_MOD_SIMPLE([_pickle]) +PY_STDLIB_MOD_SIMPLE([_posixsubprocess]) PY_STDLIB_MOD_SIMPLE([_queue]) PY_STDLIB_MOD_SIMPLE([_random]) PY_STDLIB_MOD_SIMPLE([select]) @@ -6140,6 +6142,7 @@ PY_STDLIB_MOD_SIMPLE([_xxsubinterpreters]) PY_STDLIB_MOD_SIMPLE([_zoneinfo]) dnl needs libm +PY_STDLIB_MOD_SIMPLE([audioop], [], [$LIBM]) PY_STDLIB_MOD_SIMPLE([_statistics], [], [$LIBM]) PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM]) PY_STDLIB_MOD_SIMPLE([math], [], [$LIBM]) diff --git a/setup.py b/setup.py index dd1a3df60bfdf1..139847c87ececa 100644 --- a/setup.py +++ b/setup.py @@ -1062,14 +1062,13 @@ def detect_simple_extensions(self): # 64-bit platforms. # # audioop needs libm for floor() in multiple functions. - self.add(Extension('audioop', ['audioop.c'], - libraries=['m'])) + self.addext(Extension('audioop', ['audioop.c'])) # CSV files - self.add(Extension('_csv', ['_csv.c'])) + self.addext(Extension('_csv', ['_csv.c'])) # POSIX subprocess module helper. - self.add(Extension('_posixsubprocess', ['_posixsubprocess.c'])) + self.addext(Extension('_posixsubprocess', ['_posixsubprocess.c'])) def detect_test_extensions(self): # Python C API test module