mirror of
https://github.com/python/cpython.git
synced 2025-09-11 03:07:01 +00:00
bpo-45847: Port xxlimited and xxlimited_35 to PY_STDLIB_MOD (GH-29707)
This commit is contained in:
parent
1037ca5a8e
commit
2dc7d3dda6
4 changed files with 99 additions and 6 deletions
|
@ -135,9 +135,14 @@
|
||||||
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
|
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
|
||||||
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
|
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
|
||||||
|
|
||||||
|
|
||||||
# Some testing modules MUST be built as shared libraries.
|
# Some testing modules MUST be built as shared libraries.
|
||||||
*shared*
|
*shared*
|
||||||
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
|
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
|
||||||
@MODULE__TESTIMPORTMULTIPLE_TRUE@_testimportmultiple _testimportmultiple.c
|
@MODULE__TESTIMPORTMULTIPLE_TRUE@_testimportmultiple _testimportmultiple.c
|
||||||
@MODULE__TESTMULTIPHASE_TRUE@_testmultiphase _testmultiphase.c
|
@MODULE__TESTMULTIPHASE_TRUE@_testmultiphase _testmultiphase.c
|
||||||
@MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c
|
@MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c
|
||||||
|
|
||||||
|
# Limited API template modules; must be built as shared modules.
|
||||||
|
@MODULE_XXLIMITED_TRUE@xxlimited xxlimited.c
|
||||||
|
@MODULE_XXLIMITED_35_TRUE@xxlimited_35 xxlimited_35.c
|
||||||
|
|
85
configure
vendored
85
configure
vendored
|
@ -624,6 +624,10 @@ ac_includes_default="\
|
||||||
|
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
MODULE_BLOCK
|
MODULE_BLOCK
|
||||||
|
MODULE_XXLIMITED_35_FALSE
|
||||||
|
MODULE_XXLIMITED_35_TRUE
|
||||||
|
MODULE_XXLIMITED_FALSE
|
||||||
|
MODULE_XXLIMITED_TRUE
|
||||||
MODULE__CTYPES_TEST_FALSE
|
MODULE__CTYPES_TEST_FALSE
|
||||||
MODULE__CTYPES_TEST_TRUE
|
MODULE__CTYPES_TEST_TRUE
|
||||||
MODULE__XXTESTFUZZ_FALSE
|
MODULE__XXTESTFUZZ_FALSE
|
||||||
|
@ -21838,6 +21842,79 @@ fi
|
||||||
$as_echo "$py_cv_module__ctypes_test" >&6; }
|
$as_echo "$py_cv_module__ctypes_test" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ $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()
|
# substitute multiline block, must come after last PY_STDLIB_MOD()
|
||||||
|
|
||||||
|
|
||||||
|
@ -22214,6 +22291,14 @@ if test -z "${MODULE__CTYPES_TEST_TRUE}" && test -z "${MODULE__CTYPES_TEST_FALSE
|
||||||
as_fn_error $? "conditional \"MODULE__CTYPES_TEST\" was never defined.
|
as_fn_error $? "conditional \"MODULE__CTYPES_TEST\" 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_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}"
|
: "${CONFIG_STATUS=./config.status}"
|
||||||
ac_write_fail=0
|
ac_write_fail=0
|
||||||
|
|
|
@ -6219,6 +6219,11 @@ PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes])
|
||||||
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
|
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
|
||||||
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [], [], [-lm])
|
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [], [], [-lm])
|
||||||
|
|
||||||
|
dnl Limited API template modules.
|
||||||
|
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()
|
# substitute multiline block, must come after last PY_STDLIB_MOD()
|
||||||
AC_SUBST([MODULE_BLOCK])
|
AC_SUBST([MODULE_BLOCK])
|
||||||
|
|
||||||
|
|
10
setup.py
10
setup.py
|
@ -1477,13 +1477,11 @@ class PyBuildExt(build_ext):
|
||||||
self.missing.append('_tkinter')
|
self.missing.append('_tkinter')
|
||||||
self.detect_uuid()
|
self.detect_uuid()
|
||||||
|
|
||||||
## # Uncomment these lines if you want to play with xxmodule.c
|
# Uncomment the next line if you want to play with xxmodule.c
|
||||||
## self.add(Extension('xx', ['xxmodule.c']))
|
# self.add(Extension('xx', ['xxmodule.c']))
|
||||||
|
|
||||||
# The limited C API is not compatible with the Py_TRACE_REFS macro.
|
self.addext(Extension('xxlimited', ['xxlimited.c']))
|
||||||
if not sysconfig.get_config_var('Py_TRACE_REFS'):
|
self.addext(Extension('xxlimited_35', ['xxlimited_35.c']))
|
||||||
self.add(Extension('xxlimited', ['xxlimited.c']))
|
|
||||||
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
|
|
||||||
|
|
||||||
def detect_tkinter_fromenv(self):
|
def detect_tkinter_fromenv(self):
|
||||||
# Build _tkinter using the Tcl/Tk locations specified by
|
# Build _tkinter using the Tcl/Tk locations specified by
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue