Skip to content

Commit e34c936

Browse files
authored
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
1 parent fc05e6b commit e34c936

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: Modules/Setup.stdlib.in

+1-2
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,10 @@
169169
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
170170
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
171171
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
172-
172+
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
173173

174174
# Some testing modules MUST be built as shared libraries.
175175
*shared*
176-
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
177176
@MODULE__TESTIMPORTMULTIPLE_TRUE@_testimportmultiple _testimportmultiple.c
178177
@MODULE__TESTMULTIPHASE_TRUE@_testmultiphase _testmultiphase.c
179178
@MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c

Diff for: Modules/_testcapimodule.c

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
macro defined, but only the public C API must be tested here. */
1313

1414
#undef Py_BUILD_CORE_MODULE
15+
#undef Py_BUILD_CORE_BUILTIN
16+
1517
/* Always enable assertions */
1618
#undef NDEBUG
1719

Diff for: configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -21258,8 +21258,8 @@ fi
2125821258
if test "$enable_test_modules" = no; then
2125921259
TEST_MODULES=no
2126021260
else
21261-
case $ac_sys_system in #(
21262-
Emscripten) :
21261+
case $ac_sys_system/$ac_sys_emscripten_target in #(
21262+
Emscripten/browser) :
2126321263
TEST_MODULES=no ;; #(
2126421264
*) :
2126521265
TEST_MODULES=yes

Diff for: configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -6309,8 +6309,8 @@ AC_ARG_ENABLE(test-modules,
63096309
if test "$enable_test_modules" = no; then
63106310
TEST_MODULES=no
63116311
else
6312-
AS_CASE([$ac_sys_system],
6313-
[Emscripten], [TEST_MODULES=no],
6312+
AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
6313+
[Emscripten/browser], [TEST_MODULES=no],
63146314
[TEST_MODULES=yes]
63156315
)
63166316
fi

0 commit comments

Comments
 (0)