Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 8 additions & 1 deletion Modules/Setup.stdlib.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
@MODULE__QUEUE_TRUE@_queue _queuemodule.c
@MODULE__RANDOM_TRUE@_random _randommodule.c
@MODULE__TYPING_TRUE@_typing _typingmodule.c
@MODULE__XXSUBINTERPRETERS_TRUE@_xxsubinterpreters _xxsubinterpretersmodule.c
@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c

# needs libm
Expand Down Expand Up @@ -131,6 +130,14 @@
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c


############################################################################
# Template modules

@MODULE__XXSUBINTERPRETERS_TRUE@_xxsubinterpreters _xxsubinterpretersmodule.c
@MODULE_XXLIMITED_TRUE@xxlimited xxlimited.c
@MODULE_XXLIMITED_35_TRUE@xxlimited_35 xxlimited_35.c

# Some testing modules MUST be built as shared libraries.
*shared*
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
Expand Down
115 changes: 100 additions & 15 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,12 @@ ac_includes_default="\

ac_subst_vars='LTLIBOBJS
MODULE_BLOCK
MODULE_XXLIMITED_35_FALSE
MODULE_XXLIMITED_35_TRUE
MODULE_XXLIMITED_FALSE
MODULE_XXLIMITED_TRUE
MODULE__XXSUBINTERPRETERS_FALSE
MODULE__XXSUBINTERPRETERS_TRUE
MODULE__CTYPES_TEST_FALSE
MODULE__CTYPES_TEST_TRUE
MODULE__XXTESTFUZZ_FALSE
Expand Down Expand Up @@ -712,8 +718,6 @@ MODULE__STATISTICS_FALSE
MODULE__STATISTICS_TRUE
MODULE__ZONEINFO_FALSE
MODULE__ZONEINFO_TRUE
MODULE__XXSUBINTERPRETERS_FALSE
MODULE__XXSUBINTERPRETERS_TRUE
MODULE__TYPING_FALSE
MODULE__TYPING_TRUE
MODULE_SELECT_FALSE
Expand Down Expand Up @@ -20556,15 +20560,6 @@ else
fi
as_fn_append MODULE_BLOCK "MODULE__TYPING=yes$as_nl"

if true; then
MODULE__XXSUBINTERPRETERS_TRUE=
MODULE__XXSUBINTERPRETERS_FALSE='#'
else
MODULE__XXSUBINTERPRETERS_TRUE='#'
MODULE__XXSUBINTERPRETERS_FALSE=
fi
as_fn_append MODULE_BLOCK "MODULE__XXSUBINTERPRETERS=yes$as_nl"

if true; then
MODULE__ZONEINFO_TRUE=
MODULE__ZONEINFO_FALSE='#'
Expand Down Expand Up @@ -21792,6 +21787,88 @@ fi
$as_echo "$py_cv_module__ctypes_test" >&6; }



if true; then
MODULE__XXSUBINTERPRETERS_TRUE=
MODULE__XXSUBINTERPRETERS_FALSE='#'
else
MODULE__XXSUBINTERPRETERS_TRUE='#'
MODULE__XXSUBINTERPRETERS_FALSE=
fi
as_fn_append MODULE_BLOCK "MODULE__XXSUBINTERPRETERS=yes$as_nl"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxlimited" >&5
$as_echo_n "checking for stdlib extension module xxlimited... " >&6; }
case $py_stdlib_not_available in #(
*xxlimited*) :
py_cv_module_xxlimited=n/a ;; #(
*) :
if test "$Py_TRACE_REFS" = no; then :
if true; then :
py_cv_module_xxlimited=yes
else
py_cv_module_xxlimited=missing
fi
else
py_cv_module_xxlimited=disabled
fi
;;
esac
as_fn_append MODULE_BLOCK "MODULE_XXLIMITED=$py_cv_module_xxlimited$as_nl"
if test "x$py_cv_module_xxlimited" = xyes; then :




fi
if test "$py_cv_module_xxlimited" = yes; then
MODULE_XXLIMITED_TRUE=
MODULE_XXLIMITED_FALSE='#'
else
MODULE_XXLIMITED_TRUE='#'
MODULE_XXLIMITED_FALSE=
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxlimited" >&5
$as_echo "$py_cv_module_xxlimited" >&6; }


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxlimited_35" >&5
$as_echo_n "checking for stdlib extension module xxlimited_35... " >&6; }
case $py_stdlib_not_available in #(
*xxlimited_35*) :
py_cv_module_xxlimited_35=n/a ;; #(
*) :
if test "$Py_TRACE_REFS" = no; then :
if true; then :
py_cv_module_xxlimited_35=yes
else
py_cv_module_xxlimited_35=missing
fi
else
py_cv_module_xxlimited_35=disabled
fi
;;
esac
as_fn_append MODULE_BLOCK "MODULE_XXLIMITED_35=$py_cv_module_xxlimited_35$as_nl"
if test "x$py_cv_module_xxlimited_35" = xyes; then :




fi
if test "$py_cv_module_xxlimited_35" = yes; then
MODULE_XXLIMITED_35_TRUE=
MODULE_XXLIMITED_35_FALSE='#'
else
MODULE_XXLIMITED_35_TRUE='#'
MODULE_XXLIMITED_35_FALSE=
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxlimited_35" >&5
$as_echo "$py_cv_module_xxlimited_35" >&6; }


# substitute multiline block, must come after last PY_STDLIB_MOD()


Expand Down Expand Up @@ -21972,10 +22049,6 @@ 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__XXSUBINTERPRETERS_TRUE}" && test -z "${MODULE__XXSUBINTERPRETERS_FALSE}"; then
as_fn_error $? "conditional \"MODULE__XXSUBINTERPRETERS\" 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
Expand Down Expand Up @@ -22152,6 +22225,18 @@ if test -z "${MODULE__CTYPES_TEST_TRUE}" && test -z "${MODULE__CTYPES_TEST_FALSE
as_fn_error $? "conditional \"MODULE__CTYPES_TEST\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE__XXSUBINTERPRETERS_TRUE}" && test -z "${MODULE__XXSUBINTERPRETERS_FALSE}"; then
as_fn_error $? "conditional \"MODULE__XXSUBINTERPRETERS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE_XXLIMITED_TRUE}" && test -z "${MODULE_XXLIMITED_FALSE}"; then
as_fn_error $? "conditional \"MODULE_XXLIMITED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE_XXLIMITED_35_TRUE}" && test -z "${MODULE_XXLIMITED_35_FALSE}"; then
as_fn_error $? "conditional \"MODULE_XXLIMITED_35\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
Expand Down
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6136,7 +6136,6 @@ PY_STDLIB_MOD_SIMPLE([_queue])
PY_STDLIB_MOD_SIMPLE([_random])
PY_STDLIB_MOD_SIMPLE([select])
PY_STDLIB_MOD_SIMPLE([_typing])
PY_STDLIB_MOD_SIMPLE([_xxsubinterpreters])
PY_STDLIB_MOD_SIMPLE([_zoneinfo])

dnl needs libm
Expand Down Expand Up @@ -6215,6 +6214,12 @@ PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [], [], [-lm])

dnl Template modules.
PY_STDLIB_MOD_SIMPLE([_xxsubinterpreters])
dnl The limited C API is not compatible with the Py_TRACE_REFS macro.
PY_STDLIB_MOD([xxlimited], [test "$Py_TRACE_REFS" = no])
PY_STDLIB_MOD([xxlimited_35], [test "$Py_TRACE_REFS" = no])

# substitute multiline block, must come after last PY_STDLIB_MOD()
AC_SUBST([MODULE_BLOCK])

Expand Down
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1474,13 +1474,11 @@ def detect_modules(self):
self.missing.append('_tkinter')
self.detect_uuid()

## # Uncomment these lines if you want to play with xxmodule.c
## self.add(Extension('xx', ['xxmodule.c']))
# Uncomment the next line if you want to play with xxmodule.c
# self.add(Extension('xx', ['xxmodule.c']))

# The limited C API is not compatible with the Py_TRACE_REFS macro.
if not sysconfig.get_config_var('Py_TRACE_REFS'):
self.add(Extension('xxlimited', ['xxlimited.c']))
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
self.addext(Extension('xxlimited', ['xxlimited.c']))
self.addext(Extension('xxlimited_35', ['xxlimited_35.c']))

def detect_tkinter_fromenv(self):
# Build _tkinter using the Tcl/Tk locations specified by
Expand Down