Allow selection of debug build interpreters (#11520)

Extends the `PythonVariant` logic to support interpreters with the debug
flag enabled.
This commit is contained in:
Zanie Blue
2025-09-12 08:32:22 -05:00
committed by GitHub
parent 8917b00fd9
commit 8f3583a6e6
17 changed files with 8015 additions and 109 deletions
@@ -654,6 +654,8 @@ def main() -> None:
# The `t` abiflag for freethreading Python.
# https://peps.python.org/pep-0703/#build-configuration-changes
"gil_disabled": bool(sysconfig.get_config_var("Py_GIL_DISABLED")),
# https://docs.python.org/3/using/configure.html#debug-build
"debug_enabled": bool(sysconfig.get_config_var("Py_DEBUG")),
# Determine if the interpreter is 32-bit or 64-bit.
# https://github.com/python/cpython/blob/b228655c227b2ca298a8ffac44d14ce3d22f6faa/Lib/venv/__init__.py#L136
"pointer_size": "64" if sys.maxsize > 2**32 else "32",