[Python-checkins] bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
tiran
webhook-mailer at python.org
Wed Jan 12 14:27:42 EST 2022
https://github.com/python/cpython/commit/e34c9367f8e0068ca4bcad9fb5c2c1024d02a77d
commit: e34c9367f8e0068ca4bcad9fb5c2c1024d02a77d
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022-01-12T20:27:37+01:00
summary:
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
files:
M Modules/Setup.stdlib.in
M Modules/_testcapimodule.c
M configure
M configure.ac
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
index 5788b446201e5..73f041eb2fba9 100644
--- a/Modules/Setup.stdlib.in
+++ b/Modules/Setup.stdlib.in
@@ -169,11 +169,10 @@
@MODULE__XXTESTFUZZ_TRUE at _xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
@MODULE__TESTBUFFER_TRUE at _testbuffer _testbuffer.c
@MODULE__TESTINTERNALCAPI_TRUE at _testinternalcapi _testinternalcapi.c
-
+ at MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
# Some testing modules MUST be built as shared libraries.
*shared*
- at MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
@MODULE__TESTIMPORTMULTIPLE_TRUE at _testimportmultiple _testimportmultiple.c
@MODULE__TESTMULTIPHASE_TRUE at _testmultiphase _testmultiphase.c
@MODULE__CTYPES_TEST_TRUE at _ctypes_test _ctypes/_ctypes_test.c
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index ea9c048554d22..7369f094faedd 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -12,6 +12,8 @@
macro defined, but only the public C API must be tested here. */
#undef Py_BUILD_CORE_MODULE
+#undef Py_BUILD_CORE_BUILTIN
+
/* Always enable assertions */
#undef NDEBUG
diff --git a/configure b/configure
index 327e9bd2d3f34..6c9aacc68a956 100755
--- a/configure
+++ b/configure
@@ -21258,8 +21258,8 @@ fi
if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
- case $ac_sys_system in #(
- Emscripten) :
+ case $ac_sys_system/$ac_sys_emscripten_target in #(
+ Emscripten/browser) :
TEST_MODULES=no ;; #(
*) :
TEST_MODULES=yes
diff --git a/configure.ac b/configure.ac
index 25181c0f7ed17..4396828bf6fe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6309,8 +6309,8 @@ AC_ARG_ENABLE(test-modules,
if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
- AS_CASE([$ac_sys_system],
- [Emscripten], [TEST_MODULES=no],
+ AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
+ [Emscripten/browser], [TEST_MODULES=no],
[TEST_MODULES=yes]
)
fi
More information about the Python-checkins
mailing list