]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)
authorVictor Stinner <vstinner@python.org>
Mon, 21 Aug 2023 20:16:23 +0000 (22:16 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Aug 2023 20:16:23 +0000 (22:16 +0200)
Enable with --disable-gil --without-pydebug:

    $ make pythoninfo|grep NOGIL
    sysconfig[Py_NOGIL]: 1

    $ ./python -m test
    ...
    == Python build: nogil debug
    ...

Lib/test/libregrtest/utils.py
Lib/test/pythoninfo.py

index fd46819fd903fe49148a8ddf926ca4dde97426ea..89a149ec5d6b366693a528e12ac72ae09d3f729f 100644 (file)
@@ -228,6 +228,11 @@ def get_build_info():
     ldflags_nodist = sysconfig.get_config_var('PY_LDFLAGS_NODIST') or ''
 
     build = []
+
+    # --disable-gil
+    if sysconfig.get_config_var('Py_NOGIL'):
+        build.append("nogil")
+
     if hasattr(sys, 'gettotalrefcount'):
         # --with-pydebug
         build.append('debug')
index e4e098dd84cfb9c2c91dc06f18c1684244bc6506..ad7d5291af42f3d670b63e285dda2688061f7696 100644 (file)
@@ -492,6 +492,7 @@ def collect_sysconfig(info_add):
         'PY_STDMODULE_CFLAGS',
         'Py_DEBUG',
         'Py_ENABLE_SHARED',
+        'Py_NOGIL',
         'SHELL',
         'SOABI',
         'prefix',