You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, as part of the sysconfig internals, we generate a _sysconfigdata Python module containing the variables for sysconfig.get_config_vars(). This data is consists of all Makefile variables, which can be encoded as JSON data.
The use of a module instead of a text file is historic, and adds unnecessary complexity. Converting _sysconfigdata to a JSON file would simplify the sysconfig implementation. Additionally, it also makes it easier for tools to introspect the Python installation, as this would remove the necessity to execute Python code to read _sysconfigdata.
Converting the module to a JSON file seems to be causing some issues on special platforms, such as WASM. Let's install a JSON file together with the module as a starting point, which will enable the introspection use-case, and then explore the possibility of replacing the module with it.
Activity
pythonGH-127178: convert _sysconfigdata to a JSON file
FFY00 commentedon Nov 26, 2024
Converting the module to a JSON file seems to be causing some issues on special platforms, such as WASM. Let's install a JSON file together with the module as a starting point, which will enable the introspection use-case, and then explore the possibility of replacing the module with it.
pythonGH-127178: install a _sysconfig_vars_(...).json in the stdlib d…
Merge branch 'main' into pythongh-127178-install-json-only
GH-127178: install a _sysconfig_vars_(...).json file in the stdlib di…
nascheme commentedon Nov 29, 2024
It seems this change causes the JIT build bots to fail:
https://github.com/python/cpython/actions/runs/12090193539/job/33716932397?pr=127426
FFY00 commentedon Nov 29, 2024
How does the prefix change from
/usr/local(what is configured in the Makefile) to/home/runner/work/cpython/build? Are you settingDESTDIR?FFY00 commentedon Nov 29, 2024
Hum... no. It is setting the prefix.
cpython/.github/workflows/jit.yml
Line 135 in 38264a0
Let me do some debugging.
FFY00 commentedon Nov 29, 2024
Ah, no. I think you are getting python from a following build, which does not set the prefix, having it default to
/usr/local.cpython/.github/workflows/jit.yml
Line 144 in 38264a0
This seems to me like a bug in the
--with-build-pythonoption which keeps the installation directory, but not the prefix.FFY00 commentedon Nov 29, 2024
Ah, I got it. The sysconfig data is generated by the interpreter passed to
--with-build-python, but doesn't match the running interpreter.FFY00 commentedon Nov 29, 2024
I opened GH-127429.
pythonGH-127178: improve compatibility in _sysconfig_vars_(...).json
pythonGH-127178: improve compatibility in _sysconfig_vars_(...).json
pythonGH-127178: install a _sysconfig_vars_(...).json file in the std…
Merge branch 'main' into pythongh-127178-improve-compatibility
GH-127178: improve compatibility in `_sysconfig_vars_(...).json` (#12…
pythonGH-127178: improve compatibility in `_sysconfig_vars_(...).json` (
pablogsal commentedon May 9, 2025
Seems we have some failures when tests are executed from a relocated place:
#133743
#133742