Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE #29690

Merged
merged 3 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Modules/Setup.stdlib.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
202 changes: 157 additions & 45 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -688,26 +688,38 @@ 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__RANDOM_FALSE
MODULE__RANDOM_TRUE
MODULE__QUEUE_FALSE
MODULE__QUEUE_TRUE
MODULE__PICKLE_FALSE
MODULE__PICKLE_TRUE
MODULE_MATH_FALSE
MODULE_MATH_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
Expand Down Expand Up @@ -19599,29 +19611,27 @@ fi


if true; then
MODULE__BISECT_TRUE=
MODULE__BISECT_FALSE='#'
MODULE__ASYNCIO_TRUE=
MODULE__ASYNCIO_FALSE='#'
else
MODULE__BISECT_TRUE='#'
MODULE__BISECT_FALSE=
MODULE__ASYNCIO_TRUE='#'
MODULE__ASYNCIO_FALSE=
fi





if true; then
MODULE_CMATH_TRUE=
MODULE_CMATH_FALSE='#'
MODULE__BISECT_TRUE=
MODULE__BISECT_FALSE='#'
else
MODULE_CMATH_TRUE='#'
MODULE_CMATH_FALSE=
MODULE__BISECT_TRUE='#'
MODULE__BISECT_FALSE=
fi



as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl"



if true; then
Expand All @@ -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='#'
Expand All @@ -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





Expand All @@ -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='#'
Expand All @@ -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='#'
Expand All @@ -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 #(
Expand Down Expand Up @@ -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__BISECT_TRUE}" && test -z "${MODULE__BISECT_FALSE}"; then
as_fn_error $? "conditional \"MODULE__BISECT\" was never defined.
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_CMATH_TRUE}" && test -z "${MODULE_CMATH_FALSE}"; then
as_fn_error $? "conditional \"MODULE_CMATH\" was never defined.
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__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
Expand All @@ -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
Expand Down
16 changes: 13 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
Loading