mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
bpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH-29688)
This commit is contained in:
parent
db2277a114
commit
133c65a870
|
@ -28,6 +28,12 @@
|
|||
|
||||
############################################################################
|
||||
# Modules that should always be present (POSIX and Windows):
|
||||
@MODULE_ARRAY_TRUE@array arraymodule.c
|
||||
@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
|
||||
|
||||
# needs libm
|
||||
@MODULE_MATH_TRUE@math mathmodule.c
|
||||
@MODULE_CMATH_TRUE@cmath cmathmodule.c
|
||||
|
||||
# needs libm and on some platforms librt
|
||||
@MODULE__DATETIME_TRUE@_datetime _datetimemodule.c
|
||||
|
|
76
configure
vendored
76
configure
vendored
|
@ -688,8 +688,16 @@ MODULE_OSSAUDIODEV_FALSE
|
|||
MODULE_OSSAUDIODEV_TRUE
|
||||
MODULE_GRP_FALSE
|
||||
MODULE_GRP_TRUE
|
||||
MODULE_CMATH_FALSE
|
||||
MODULE_CMATH_TRUE
|
||||
MODULE_MATH_FALSE
|
||||
MODULE_MATH_TRUE
|
||||
MODULE__DATETIME_FALSE
|
||||
MODULE__DATETIME_TRUE
|
||||
MODULE__CONTEXTVARS_FALSE
|
||||
MODULE__CONTEXTVARS_TRUE
|
||||
MODULE_ARRAY_FALSE
|
||||
MODULE_ARRAY_TRUE
|
||||
MODULE_TIME_FALSE
|
||||
MODULE_TIME_TRUE
|
||||
MODULE__IO_FALSE
|
||||
|
@ -19566,6 +19574,30 @@ fi
|
|||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE_ARRAY_TRUE=
|
||||
MODULE_ARRAY_FALSE='#'
|
||||
else
|
||||
MODULE_ARRAY_TRUE='#'
|
||||
MODULE_ARRAY_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__CONTEXTVARS_TRUE=
|
||||
MODULE__CONTEXTVARS_FALSE='#'
|
||||
else
|
||||
MODULE__CONTEXTVARS_TRUE='#'
|
||||
MODULE__CONTEXTVARS_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if true; then
|
||||
MODULE__DATETIME_TRUE=
|
||||
MODULE__DATETIME_FALSE='#'
|
||||
|
@ -19580,6 +19612,34 @@ 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_CMATH_TRUE=
|
||||
MODULE_CMATH_FALSE='#'
|
||||
else
|
||||
MODULE_CMATH_TRUE='#'
|
||||
MODULE_CMATH_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$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; }
|
||||
|
@ -20745,10 +20805,26 @@ if test -z "${MODULE_TIME_TRUE}" && test -z "${MODULE_TIME_FALSE}"; then
|
|||
as_fn_error $? "conditional \"MODULE_TIME\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
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__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_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_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_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
|
||||
|
|
|
@ -6075,7 +6075,11 @@ PY_STDLIB_MOD_SIMPLE([_io], [-I\$(srcdir)/Modules/_io], [])
|
|||
PY_STDLIB_MOD_SIMPLE([time], [], [$TIMEMODULE_LIB])
|
||||
|
||||
dnl always enabled extension modules
|
||||
PY_STDLIB_MOD_SIMPLE([array])
|
||||
PY_STDLIB_MOD_SIMPLE([_contextvars])
|
||||
PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
|
||||
PY_STDLIB_MOD_SIMPLE([math], [], [$LIBM])
|
||||
PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
|
||||
|
||||
dnl platform specific extensions
|
||||
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
|
||||
|
|
10
setup.py
10
setup.py
|
@ -984,18 +984,16 @@ def detect_simple_extensions(self):
|
|||
#
|
||||
|
||||
# array objects
|
||||
self.add(Extension('array', ['arraymodule.c']))
|
||||
self.addext(Extension('array', ['arraymodule.c']))
|
||||
|
||||
# Context Variables
|
||||
self.add(Extension('_contextvars', ['_contextvarsmodule.c']))
|
||||
self.addext(Extension('_contextvars', ['_contextvarsmodule.c']))
|
||||
|
||||
# math library functions, e.g. sin()
|
||||
self.add(Extension('math', ['mathmodule.c'],
|
||||
libraries=['m']))
|
||||
self.addext(Extension('math', ['mathmodule.c']))
|
||||
|
||||
# complex math library functions
|
||||
self.add(Extension('cmath', ['cmathmodule.c'],
|
||||
libraries=['m']))
|
||||
self.addext(Extension('cmath', ['cmathmodule.c']))
|
||||
|
||||
# time libraries: librt may be needed for clock_gettime()
|
||||
time_libs = []
|
||||
|
|
Loading…
Reference in a new issue