mirror of https://github.com/python/cpython
bpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_MOD_SIMPLE (GH-29689)
Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
133c65a870
commit
718cee08cc
|
@ -29,7 +29,13 @@
|
||||||
############################################################################
|
############################################################################
|
||||||
# Modules that should always be present (POSIX and Windows):
|
# Modules that should always be present (POSIX and Windows):
|
||||||
@MODULE_ARRAY_TRUE@array arraymodule.c
|
@MODULE_ARRAY_TRUE@array arraymodule.c
|
||||||
|
@MODULE__BISECT_TRUE@_bisect _bisectmodule.c
|
||||||
@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
|
@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
|
||||||
|
@MODULE__HEAPQ_TRUE@_heapq _heapqmodule.c
|
||||||
|
@MODULE__JSON_TRUE@_json _json.c
|
||||||
|
@MODULE__PICKLE_TRUE@_pickle _pickle.c
|
||||||
|
@MODULE__RANDOM_TRUE@_random _randommodule.c
|
||||||
|
@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c
|
||||||
|
|
||||||
# needs libm
|
# needs libm
|
||||||
@MODULE_MATH_TRUE@math mathmodule.c
|
@MODULE_MATH_TRUE@math mathmodule.c
|
||||||
|
|
|
@ -688,14 +688,26 @@ MODULE_OSSAUDIODEV_FALSE
|
||||||
MODULE_OSSAUDIODEV_TRUE
|
MODULE_OSSAUDIODEV_TRUE
|
||||||
MODULE_GRP_FALSE
|
MODULE_GRP_FALSE
|
||||||
MODULE_GRP_TRUE
|
MODULE_GRP_TRUE
|
||||||
MODULE_CMATH_FALSE
|
MODULE__ZONEINFO_FALSE
|
||||||
MODULE_CMATH_TRUE
|
MODULE__ZONEINFO_TRUE
|
||||||
|
MODULE__RANDOM_FALSE
|
||||||
|
MODULE__RANDOM_TRUE
|
||||||
|
MODULE__PICKLE_FALSE
|
||||||
|
MODULE__PICKLE_TRUE
|
||||||
MODULE_MATH_FALSE
|
MODULE_MATH_FALSE
|
||||||
MODULE_MATH_TRUE
|
MODULE_MATH_TRUE
|
||||||
|
MODULE__JSON_FALSE
|
||||||
|
MODULE__JSON_TRUE
|
||||||
|
MODULE__HEAPQ_FALSE
|
||||||
|
MODULE__HEAPQ_TRUE
|
||||||
MODULE__DATETIME_FALSE
|
MODULE__DATETIME_FALSE
|
||||||
MODULE__DATETIME_TRUE
|
MODULE__DATETIME_TRUE
|
||||||
MODULE__CONTEXTVARS_FALSE
|
MODULE__CONTEXTVARS_FALSE
|
||||||
MODULE__CONTEXTVARS_TRUE
|
MODULE__CONTEXTVARS_TRUE
|
||||||
|
MODULE_CMATH_FALSE
|
||||||
|
MODULE_CMATH_TRUE
|
||||||
|
MODULE__BISECT_FALSE
|
||||||
|
MODULE__BISECT_TRUE
|
||||||
MODULE_ARRAY_FALSE
|
MODULE_ARRAY_FALSE
|
||||||
MODULE_ARRAY_TRUE
|
MODULE_ARRAY_TRUE
|
||||||
MODULE_TIME_FALSE
|
MODULE_TIME_FALSE
|
||||||
|
@ -19586,6 +19598,32 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
MODULE__BISECT_TRUE=
|
||||||
|
MODULE__BISECT_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__BISECT_TRUE='#'
|
||||||
|
MODULE__BISECT_FALSE=
|
||||||
|
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
|
if true; then
|
||||||
MODULE__CONTEXTVARS_TRUE=
|
MODULE__CONTEXTVARS_TRUE=
|
||||||
MODULE__CONTEXTVARS_FALSE='#'
|
MODULE__CONTEXTVARS_FALSE='#'
|
||||||
|
@ -19612,6 +19650,30 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
MODULE__HEAPQ_TRUE=
|
||||||
|
MODULE__HEAPQ_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__HEAPQ_TRUE='#'
|
||||||
|
MODULE__HEAPQ_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
MODULE__JSON_TRUE=
|
||||||
|
MODULE__JSON_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__JSON_TRUE='#'
|
||||||
|
MODULE__JSON_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if true; then
|
if true; then
|
||||||
MODULE_MATH_TRUE=
|
MODULE_MATH_TRUE=
|
||||||
MODULE_MATH_FALSE='#'
|
MODULE_MATH_FALSE='#'
|
||||||
|
@ -19627,16 +19689,38 @@ fi
|
||||||
|
|
||||||
|
|
||||||
if true; then
|
if true; then
|
||||||
MODULE_CMATH_TRUE=
|
MODULE__PICKLE_TRUE=
|
||||||
MODULE_CMATH_FALSE='#'
|
MODULE__PICKLE_FALSE='#'
|
||||||
else
|
else
|
||||||
MODULE_CMATH_TRUE='#'
|
MODULE__PICKLE_TRUE='#'
|
||||||
MODULE_CMATH_FALSE=
|
MODULE__PICKLE_FALSE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl"
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
MODULE__RANDOM_TRUE=
|
||||||
|
MODULE__RANDOM_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__RANDOM_TRUE='#'
|
||||||
|
MODULE__RANDOM_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if true; then
|
||||||
|
MODULE__ZONEINFO_TRUE=
|
||||||
|
MODULE__ZONEINFO_FALSE='#'
|
||||||
|
else
|
||||||
|
MODULE__ZONEINFO_TRUE='#'
|
||||||
|
MODULE__ZONEINFO_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20809,6 +20893,14 @@ if test -z "${MODULE_ARRAY_TRUE}" && test -z "${MODULE_ARRAY_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"MODULE_ARRAY\" was never defined.
|
as_fn_error $? "conditional \"MODULE_ARRAY\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
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
|
if test -z "${MODULE__CONTEXTVARS_TRUE}" && test -z "${MODULE__CONTEXTVARS_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"MODULE__CONTEXTVARS\" was never defined.
|
as_fn_error $? "conditional \"MODULE__CONTEXTVARS\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
@ -20817,12 +20909,28 @@ if test -z "${MODULE__DATETIME_TRUE}" && test -z "${MODULE__DATETIME_FALSE}"; th
|
||||||
as_fn_error $? "conditional \"MODULE__DATETIME\" was never defined.
|
as_fn_error $? "conditional \"MODULE__DATETIME\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
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
|
||||||
|
fi
|
||||||
|
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
|
if test -z "${MODULE_MATH_TRUE}" && test -z "${MODULE_MATH_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"MODULE_MATH\" was never defined.
|
as_fn_error $? "conditional \"MODULE_MATH\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
if test -z "${MODULE_CMATH_TRUE}" && test -z "${MODULE_CMATH_FALSE}"; then
|
if test -z "${MODULE__PICKLE_TRUE}" && test -z "${MODULE__PICKLE_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"MODULE_CMATH\" was never defined.
|
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__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__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
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
if test -z "${MODULE_GRP_TRUE}" && test -z "${MODULE_GRP_FALSE}"; then
|
if test -z "${MODULE_GRP_TRUE}" && test -z "${MODULE_GRP_FALSE}"; then
|
||||||
|
|
|
@ -6076,10 +6076,16 @@ PY_STDLIB_MOD_SIMPLE([time], [], [$TIMEMODULE_LIB])
|
||||||
|
|
||||||
dnl always enabled extension modules
|
dnl always enabled extension modules
|
||||||
PY_STDLIB_MOD_SIMPLE([array])
|
PY_STDLIB_MOD_SIMPLE([array])
|
||||||
|
PY_STDLIB_MOD_SIMPLE([_bisect])
|
||||||
|
PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
|
||||||
PY_STDLIB_MOD_SIMPLE([_contextvars])
|
PY_STDLIB_MOD_SIMPLE([_contextvars])
|
||||||
PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
|
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([math], [], [$LIBM])
|
||||||
PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
|
PY_STDLIB_MOD_SIMPLE([_pickle])
|
||||||
|
PY_STDLIB_MOD_SIMPLE([_random])
|
||||||
|
PY_STDLIB_MOD_SIMPLE([_zoneinfo])
|
||||||
|
|
||||||
dnl platform specific extensions
|
dnl platform specific extensions
|
||||||
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
|
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
|
||||||
|
|
15
setup.py
15
setup.py
|
@ -1004,18 +1004,15 @@ class PyBuildExt(build_ext):
|
||||||
# libm is needed by delta_new() that uses round() and by accum() that
|
# libm is needed by delta_new() that uses round() and by accum() that
|
||||||
# uses modf().
|
# uses modf().
|
||||||
self.addext(Extension('_datetime', ['_datetimemodule.c']))
|
self.addext(Extension('_datetime', ['_datetimemodule.c']))
|
||||||
# zoneinfo module
|
self.addext(Extension('_zoneinfo', ['_zoneinfo.c']))
|
||||||
self.add(Extension('_zoneinfo', ['_zoneinfo.c']))
|
|
||||||
# random number generator implemented in C
|
# random number generator implemented in C
|
||||||
self.add(Extension("_random", ["_randommodule.c"]))
|
self.addext(Extension("_random", ["_randommodule.c"]))
|
||||||
# bisect
|
self.addext(Extension("_bisect", ["_bisectmodule.c"]))
|
||||||
self.add(Extension("_bisect", ["_bisectmodule.c"]))
|
self.addext(Extension("_heapq", ["_heapqmodule.c"]))
|
||||||
# heapq
|
|
||||||
self.add(Extension("_heapq", ["_heapqmodule.c"]))
|
|
||||||
# C-optimized pickle replacement
|
# C-optimized pickle replacement
|
||||||
self.add(Extension("_pickle", ["_pickle.c"]))
|
self.addext(Extension("_pickle", ["_pickle.c"]))
|
||||||
# _json speedups
|
# _json speedups
|
||||||
self.add(Extension("_json", ["_json.c"]))
|
self.addext(Extension("_json", ["_json.c"]))
|
||||||
|
|
||||||
# profiler (_lsprof is for cProfile.py)
|
# profiler (_lsprof is for cProfile.py)
|
||||||
self.add(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))
|
self.add(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))
|
||||||
|
|
Loading…
Reference in New Issue