From 4564db9ecabaaf2aadc015b3cb1279c3ecf8f9b9 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 8 Mar 2024 17:04:17 -0800 Subject: [PATCH 1/3] GH-115983: skip building shared modules for testing under WASI --- configure | 190 +++++++++++++++++++++++++-------------------------- configure.ac | 15 ++-- 2 files changed, 103 insertions(+), 102 deletions(-) diff --git a/configure b/configure index 5e8c9af7befde0..d5d55913b54cdf 100755 --- a/configure +++ b/configure @@ -657,10 +657,6 @@ MODULE_XXLIMITED_FALSE MODULE_XXLIMITED_TRUE MODULE__CTYPES_TEST_FALSE MODULE__CTYPES_TEST_TRUE -MODULE__XXTESTFUZZ_FALSE -MODULE__XXTESTFUZZ_TRUE -MODULE_XXSUBTYPE_FALSE -MODULE_XXSUBTYPE_TRUE MODULE__TESTEXTERNALINSPECTION_FALSE MODULE__TESTEXTERNALINSPECTION_TRUE MODULE__TESTSINGLEPHASE_FALSE @@ -669,6 +665,10 @@ MODULE__TESTMULTIPHASE_FALSE MODULE__TESTMULTIPHASE_TRUE MODULE__TESTIMPORTMULTIPLE_FALSE MODULE__TESTIMPORTMULTIPLE_TRUE +MODULE__XXTESTFUZZ_FALSE +MODULE__XXTESTFUZZ_TRUE +MODULE_XXSUBTYPE_FALSE +MODULE_XXSUBTYPE_TRUE MODULE__TESTBUFFER_FALSE MODULE__TESTBUFFER_TRUE MODULE__TESTINTERNALCAPI_FALSE @@ -30890,6 +30890,82 @@ fi printf "%s\n" "$py_cv_module__testbuffer" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxsubtype" >&5 +printf %s "checking for stdlib extension module xxsubtype... " >&6; } + if test "$py_cv_module_xxsubtype" != "n/a" +then : + + if test "$TEST_MODULES" = yes +then : + if true +then : + py_cv_module_xxsubtype=yes +else $as_nop + py_cv_module_xxsubtype=missing +fi +else $as_nop + py_cv_module_xxsubtype=disabled +fi + +fi + as_fn_append MODULE_BLOCK "MODULE_XXSUBTYPE_STATE=$py_cv_module_xxsubtype$as_nl" + if test "x$py_cv_module_xxsubtype" = xyes +then : + + + + +fi + if test "$py_cv_module_xxsubtype" = yes; then + MODULE_XXSUBTYPE_TRUE= + MODULE_XXSUBTYPE_FALSE='#' +else + MODULE_XXSUBTYPE_TRUE='#' + MODULE_XXSUBTYPE_FALSE= +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxsubtype" >&5 +printf "%s\n" "$py_cv_module_xxsubtype" >&6; } + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _xxtestfuzz" >&5 +printf %s "checking for stdlib extension module _xxtestfuzz... " >&6; } + if test "$py_cv_module__xxtestfuzz" != "n/a" +then : + + if test "$TEST_MODULES" = yes +then : + if true +then : + py_cv_module__xxtestfuzz=yes +else $as_nop + py_cv_module__xxtestfuzz=missing +fi +else $as_nop + py_cv_module__xxtestfuzz=disabled +fi + +fi + as_fn_append MODULE_BLOCK "MODULE__XXTESTFUZZ_STATE=$py_cv_module__xxtestfuzz$as_nl" + if test "x$py_cv_module__xxtestfuzz" = xyes +then : + + + + +fi + if test "$py_cv_module__xxtestfuzz" = yes; then + MODULE__XXTESTFUZZ_TRUE= + MODULE__XXTESTFUZZ_FALSE='#' +else + MODULE__XXTESTFUZZ_TRUE='#' + MODULE__XXTESTFUZZ_FALSE= +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__xxtestfuzz" >&5 +printf "%s\n" "$py_cv_module__xxtestfuzz" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _testimportmultiple" >&5 printf %s "checking for stdlib extension module _testimportmultiple... " >&6; } if test "$py_cv_module__testimportmultiple" != "n/a" @@ -30897,7 +30973,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module__testimportmultiple=yes else $as_nop @@ -30935,7 +31011,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module__testmultiphase=yes else $as_nop @@ -30973,7 +31049,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module__testsinglephase=yes else $as_nop @@ -31011,7 +31087,7 @@ then : if test "$TEST_MODULES" = yes then : - if true + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module__testexternalinspection=yes else $as_nop @@ -31042,82 +31118,6 @@ fi printf "%s\n" "$py_cv_module__testexternalinspection" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxsubtype" >&5 -printf %s "checking for stdlib extension module xxsubtype... " >&6; } - if test "$py_cv_module_xxsubtype" != "n/a" -then : - - if test "$TEST_MODULES" = yes -then : - if true -then : - py_cv_module_xxsubtype=yes -else $as_nop - py_cv_module_xxsubtype=missing -fi -else $as_nop - py_cv_module_xxsubtype=disabled -fi - -fi - as_fn_append MODULE_BLOCK "MODULE_XXSUBTYPE_STATE=$py_cv_module_xxsubtype$as_nl" - if test "x$py_cv_module_xxsubtype" = xyes -then : - - - - -fi - if test "$py_cv_module_xxsubtype" = yes; then - MODULE_XXSUBTYPE_TRUE= - MODULE_XXSUBTYPE_FALSE='#' -else - MODULE_XXSUBTYPE_TRUE='#' - MODULE_XXSUBTYPE_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxsubtype" >&5 -printf "%s\n" "$py_cv_module_xxsubtype" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _xxtestfuzz" >&5 -printf %s "checking for stdlib extension module _xxtestfuzz... " >&6; } - if test "$py_cv_module__xxtestfuzz" != "n/a" -then : - - if test "$TEST_MODULES" = yes -then : - if true -then : - py_cv_module__xxtestfuzz=yes -else $as_nop - py_cv_module__xxtestfuzz=missing -fi -else $as_nop - py_cv_module__xxtestfuzz=disabled -fi - -fi - as_fn_append MODULE_BLOCK "MODULE__XXTESTFUZZ_STATE=$py_cv_module__xxtestfuzz$as_nl" - if test "x$py_cv_module__xxtestfuzz" = xyes -then : - - - - -fi - if test "$py_cv_module__xxtestfuzz" = yes; then - MODULE__XXTESTFUZZ_TRUE= - MODULE__XXTESTFUZZ_FALSE='#' -else - MODULE__XXTESTFUZZ_TRUE='#' - MODULE__XXTESTFUZZ_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__xxtestfuzz" >&5 -printf "%s\n" "$py_cv_module__xxtestfuzz" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _ctypes_test" >&5 printf %s "checking for stdlib extension module _ctypes_test... " >&6; } if test "$py_cv_module__ctypes_test" != "n/a" @@ -31125,7 +31125,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes + if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module__ctypes_test=yes else $as_nop @@ -31164,7 +31164,7 @@ then : if true then : - if test "$ac_cv_func_dlopen" = yes + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module_xxlimited=yes else $as_nop @@ -31202,7 +31202,7 @@ then : if true then : - if test "$ac_cv_func_dlopen" = yes + if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" then : py_cv_module_xxlimited_35=yes else $as_nop @@ -31650,6 +31650,14 @@ if test -z "${MODULE__TESTBUFFER_TRUE}" && test -z "${MODULE__TESTBUFFER_FALSE}" as_fn_error $? "conditional \"MODULE__TESTBUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MODULE_XXSUBTYPE_TRUE}" && test -z "${MODULE_XXSUBTYPE_FALSE}"; then + as_fn_error $? "conditional \"MODULE_XXSUBTYPE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__XXTESTFUZZ_TRUE}" && test -z "${MODULE__XXTESTFUZZ_FALSE}"; then + as_fn_error $? "conditional \"MODULE__XXTESTFUZZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${MODULE__TESTIMPORTMULTIPLE_TRUE}" && test -z "${MODULE__TESTIMPORTMULTIPLE_FALSE}"; then as_fn_error $? "conditional \"MODULE__TESTIMPORTMULTIPLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -31666,14 +31674,6 @@ if test -z "${MODULE__TESTEXTERNALINSPECTION_TRUE}" && test -z "${MODULE__TESTEX as_fn_error $? "conditional \"MODULE__TESTEXTERNALINSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${MODULE_XXSUBTYPE_TRUE}" && test -z "${MODULE_XXSUBTYPE_FALSE}"; then - as_fn_error $? "conditional \"MODULE_XXSUBTYPE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MODULE__XXTESTFUZZ_TRUE}" && test -z "${MODULE__XXTESTFUZZ_FALSE}"; then - as_fn_error $? "conditional \"MODULE__XXTESTFUZZ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${MODULE__CTYPES_TEST_TRUE}" && test -z "${MODULE__CTYPES_TEST_FALSE}"; then as_fn_error $? "conditional \"MODULE__CTYPES_TEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index e615259dcb1fca..0605579823629b 100644 --- a/configure.ac +++ b/configure.ac @@ -7626,20 +7626,21 @@ PY_STDLIB_MOD([_testclinic_limited], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testlimitedcapi], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes]) -PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) -PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) -PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) -PY_STDLIB_MOD([_testexternalinspection], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes]) +dnl The modules below must be built as shared modules; see Modules/Setup.stdlib.in . +PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) +PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) +PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) +PY_STDLIB_MOD([_testexternalinspection], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) PY_STDLIB_MOD([_ctypes_test], - [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes], + [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"], [], [$LIBM]) dnl Limited API template modules. dnl Emscripten does not support shared libraries yet. -PY_STDLIB_MOD([xxlimited], [], [test "$ac_cv_func_dlopen" = yes]) -PY_STDLIB_MOD([xxlimited_35], [], [test "$ac_cv_func_dlopen" = yes]) +PY_STDLIB_MOD([xxlimited], [], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) +PY_STDLIB_MOD([xxlimited_35], [], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) # substitute multiline block, must come after last PY_STDLIB_MOD() AC_SUBST([MODULE_BLOCK]) From 3374fe18572eff9b5ebe37bd660b1d5047db32b8 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 8 Mar 2024 17:05:22 -0800 Subject: [PATCH 2/3] Add a news file --- .../next/Build/2024-03-08-17-05-15.gh-issue-115983.ZQqk0Q.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Build/2024-03-08-17-05-15.gh-issue-115983.ZQqk0Q.rst diff --git a/Misc/NEWS.d/next/Build/2024-03-08-17-05-15.gh-issue-115983.ZQqk0Q.rst b/Misc/NEWS.d/next/Build/2024-03-08-17-05-15.gh-issue-115983.ZQqk0Q.rst new file mode 100644 index 00000000000000..a8d39921d59092 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2024-03-08-17-05-15.gh-issue-115983.ZQqk0Q.rst @@ -0,0 +1 @@ +Skip building test modules that must be built as shared under WASI. From 281cb81d91987b0bbc09e81a8deb849296b301dd Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 11 Mar 2024 13:14:32 -0700 Subject: [PATCH 3/3] Move modules to exclude to `PY_STDLIB_MOD_SET_NA` --- configure | 196 ++++++++++++++++++++++++++------------------------- configure.ac | 23 +++--- 2 files changed, 116 insertions(+), 103 deletions(-) diff --git a/configure b/configure index d5d55913b54cdf..42293c324acac6 100755 --- a/configure +++ b/configure @@ -657,6 +657,10 @@ MODULE_XXLIMITED_FALSE MODULE_XXLIMITED_TRUE MODULE__CTYPES_TEST_FALSE MODULE__CTYPES_TEST_TRUE +MODULE__XXTESTFUZZ_FALSE +MODULE__XXTESTFUZZ_TRUE +MODULE_XXSUBTYPE_FALSE +MODULE_XXSUBTYPE_TRUE MODULE__TESTEXTERNALINSPECTION_FALSE MODULE__TESTEXTERNALINSPECTION_TRUE MODULE__TESTSINGLEPHASE_FALSE @@ -665,10 +669,6 @@ MODULE__TESTMULTIPHASE_FALSE MODULE__TESTMULTIPHASE_TRUE MODULE__TESTIMPORTMULTIPLE_FALSE MODULE__TESTIMPORTMULTIPLE_TRUE -MODULE__XXTESTFUZZ_FALSE -MODULE__XXTESTFUZZ_TRUE -MODULE_XXSUBTYPE_FALSE -MODULE_XXSUBTYPE_TRUE MODULE__TESTBUFFER_FALSE MODULE__TESTBUFFER_TRUE MODULE__TESTINTERNALCAPI_FALSE @@ -28586,9 +28586,15 @@ case $ac_sys_system in #( py_cv_module__ctypes_test=n/a + py_cv_module__testexternalinspection=n/a + py_cv_module__testimportmultiple=n/a + py_cv_module__testmultiphase=n/a + py_cv_module__testsinglephase=n/a py_cv_module_fcntl=n/a py_cv_module_mmap=n/a py_cv_module_termios=n/a + py_cv_module_xxlimited=n/a + py_cv_module_xxlimited_35=n/a py_cv_module_=n/a @@ -30890,82 +30896,6 @@ fi printf "%s\n" "$py_cv_module__testbuffer" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxsubtype" >&5 -printf %s "checking for stdlib extension module xxsubtype... " >&6; } - if test "$py_cv_module_xxsubtype" != "n/a" -then : - - if test "$TEST_MODULES" = yes -then : - if true -then : - py_cv_module_xxsubtype=yes -else $as_nop - py_cv_module_xxsubtype=missing -fi -else $as_nop - py_cv_module_xxsubtype=disabled -fi - -fi - as_fn_append MODULE_BLOCK "MODULE_XXSUBTYPE_STATE=$py_cv_module_xxsubtype$as_nl" - if test "x$py_cv_module_xxsubtype" = xyes -then : - - - - -fi - if test "$py_cv_module_xxsubtype" = yes; then - MODULE_XXSUBTYPE_TRUE= - MODULE_XXSUBTYPE_FALSE='#' -else - MODULE_XXSUBTYPE_TRUE='#' - MODULE_XXSUBTYPE_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxsubtype" >&5 -printf "%s\n" "$py_cv_module_xxsubtype" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _xxtestfuzz" >&5 -printf %s "checking for stdlib extension module _xxtestfuzz... " >&6; } - if test "$py_cv_module__xxtestfuzz" != "n/a" -then : - - if test "$TEST_MODULES" = yes -then : - if true -then : - py_cv_module__xxtestfuzz=yes -else $as_nop - py_cv_module__xxtestfuzz=missing -fi -else $as_nop - py_cv_module__xxtestfuzz=disabled -fi - -fi - as_fn_append MODULE_BLOCK "MODULE__XXTESTFUZZ_STATE=$py_cv_module__xxtestfuzz$as_nl" - if test "x$py_cv_module__xxtestfuzz" = xyes -then : - - - - -fi - if test "$py_cv_module__xxtestfuzz" = yes; then - MODULE__XXTESTFUZZ_TRUE= - MODULE__XXTESTFUZZ_FALSE='#' -else - MODULE__XXTESTFUZZ_TRUE='#' - MODULE__XXTESTFUZZ_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__xxtestfuzz" >&5 -printf "%s\n" "$py_cv_module__xxtestfuzz" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _testimportmultiple" >&5 printf %s "checking for stdlib extension module _testimportmultiple... " >&6; } if test "$py_cv_module__testimportmultiple" != "n/a" @@ -30973,7 +30903,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$ac_cv_func_dlopen" = yes then : py_cv_module__testimportmultiple=yes else $as_nop @@ -31011,7 +30941,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$ac_cv_func_dlopen" = yes then : py_cv_module__testmultiphase=yes else $as_nop @@ -31049,7 +30979,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$ac_cv_func_dlopen" = yes then : py_cv_module__testsinglephase=yes else $as_nop @@ -31087,7 +31017,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if true then : py_cv_module__testexternalinspection=yes else $as_nop @@ -31118,6 +31048,82 @@ fi printf "%s\n" "$py_cv_module__testexternalinspection" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxsubtype" >&5 +printf %s "checking for stdlib extension module xxsubtype... " >&6; } + if test "$py_cv_module_xxsubtype" != "n/a" +then : + + if test "$TEST_MODULES" = yes +then : + if true +then : + py_cv_module_xxsubtype=yes +else $as_nop + py_cv_module_xxsubtype=missing +fi +else $as_nop + py_cv_module_xxsubtype=disabled +fi + +fi + as_fn_append MODULE_BLOCK "MODULE_XXSUBTYPE_STATE=$py_cv_module_xxsubtype$as_nl" + if test "x$py_cv_module_xxsubtype" = xyes +then : + + + + +fi + if test "$py_cv_module_xxsubtype" = yes; then + MODULE_XXSUBTYPE_TRUE= + MODULE_XXSUBTYPE_FALSE='#' +else + MODULE_XXSUBTYPE_TRUE='#' + MODULE_XXSUBTYPE_FALSE= +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module_xxsubtype" >&5 +printf "%s\n" "$py_cv_module_xxsubtype" >&6; } + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _xxtestfuzz" >&5 +printf %s "checking for stdlib extension module _xxtestfuzz... " >&6; } + if test "$py_cv_module__xxtestfuzz" != "n/a" +then : + + if test "$TEST_MODULES" = yes +then : + if true +then : + py_cv_module__xxtestfuzz=yes +else $as_nop + py_cv_module__xxtestfuzz=missing +fi +else $as_nop + py_cv_module__xxtestfuzz=disabled +fi + +fi + as_fn_append MODULE_BLOCK "MODULE__XXTESTFUZZ_STATE=$py_cv_module__xxtestfuzz$as_nl" + if test "x$py_cv_module__xxtestfuzz" = xyes +then : + + + + +fi + if test "$py_cv_module__xxtestfuzz" = yes; then + MODULE__XXTESTFUZZ_TRUE= + MODULE__XXTESTFUZZ_FALSE='#' +else + MODULE__XXTESTFUZZ_TRUE='#' + MODULE__XXTESTFUZZ_FALSE= +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__xxtestfuzz" >&5 +printf "%s\n" "$py_cv_module__xxtestfuzz" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _ctypes_test" >&5 printf %s "checking for stdlib extension module _ctypes_test... " >&6; } if test "$py_cv_module__ctypes_test" != "n/a" @@ -31125,7 +31131,7 @@ then : if test "$TEST_MODULES" = yes then : - if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes then : py_cv_module__ctypes_test=yes else $as_nop @@ -31164,7 +31170,7 @@ then : if true then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$ac_cv_func_dlopen" = yes then : py_cv_module_xxlimited=yes else $as_nop @@ -31202,7 +31208,7 @@ then : if true then : - if test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI" + if test "$ac_cv_func_dlopen" = yes then : py_cv_module_xxlimited_35=yes else $as_nop @@ -31650,14 +31656,6 @@ if test -z "${MODULE__TESTBUFFER_TRUE}" && test -z "${MODULE__TESTBUFFER_FALSE}" as_fn_error $? "conditional \"MODULE__TESTBUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${MODULE_XXSUBTYPE_TRUE}" && test -z "${MODULE_XXSUBTYPE_FALSE}"; then - as_fn_error $? "conditional \"MODULE_XXSUBTYPE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MODULE__XXTESTFUZZ_TRUE}" && test -z "${MODULE__XXTESTFUZZ_FALSE}"; then - as_fn_error $? "conditional \"MODULE__XXTESTFUZZ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${MODULE__TESTIMPORTMULTIPLE_TRUE}" && test -z "${MODULE__TESTIMPORTMULTIPLE_FALSE}"; then as_fn_error $? "conditional \"MODULE__TESTIMPORTMULTIPLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -31674,6 +31672,14 @@ if test -z "${MODULE__TESTEXTERNALINSPECTION_TRUE}" && test -z "${MODULE__TESTEX as_fn_error $? "conditional \"MODULE__TESTEXTERNALINSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MODULE_XXSUBTYPE_TRUE}" && test -z "${MODULE_XXSUBTYPE_FALSE}"; then + as_fn_error $? "conditional \"MODULE_XXSUBTYPE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__XXTESTFUZZ_TRUE}" && test -z "${MODULE__XXTESTFUZZ_FALSE}"; then + as_fn_error $? "conditional \"MODULE__XXTESTFUZZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${MODULE__CTYPES_TEST_TRUE}" && test -z "${MODULE__CTYPES_TEST_FALSE}"; then as_fn_error $? "conditional \"MODULE__CTYPES_TEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 0605579823629b..1778ca0b28d776 100644 --- a/configure.ac +++ b/configure.ac @@ -7397,11 +7397,19 @@ AS_CASE([$ac_sys_system], [Emscripten/node*], [], [WASI/*], [ dnl WASI SDK 15.0 does not support file locking, mmap, and more. + dnl Test modules that must be compiled as shared libraries are not supported + dnl (see Modules/Setup.stdlib.in). PY_STDLIB_MOD_SET_NA( [_ctypes_test], + [_testexternalinspection], + [_testimportmultiple], + [_testmultiphase], + [_testsinglephase], [fcntl], [mmap], [termios], + [xxlimited], + [xxlimited_35], ) ] ) @@ -7626,21 +7634,20 @@ PY_STDLIB_MOD([_testclinic_limited], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testlimitedcapi], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes]) +PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) +PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) +PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) +PY_STDLIB_MOD([_testexternalinspection], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes]) -dnl The modules below must be built as shared modules; see Modules/Setup.stdlib.in . -PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) -PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) -PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) -PY_STDLIB_MOD([_testexternalinspection], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) PY_STDLIB_MOD([_ctypes_test], - [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"], + [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes], [], [$LIBM]) dnl Limited API template modules. dnl Emscripten does not support shared libraries yet. -PY_STDLIB_MOD([xxlimited], [], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) -PY_STDLIB_MOD([xxlimited_35], [], [test "$ac_cv_func_dlopen" = yes -a "$ac_sys_system" != "WASI"]) +PY_STDLIB_MOD([xxlimited], [], [test "$ac_cv_func_dlopen" = yes]) +PY_STDLIB_MOD([xxlimited_35], [], [test "$ac_cv_func_dlopen" = yes]) # substitute multiline block, must come after last PY_STDLIB_MOD() AC_SUBST([MODULE_BLOCK])