python / cpython

The Python programming language
https://www.python.org
Other
63.66k stars 30.49k forks source link

Convert `_sysconfigdata` to a JSON file #127178

Open FFY00 opened 3 days ago

FFY00 commented 3 days ago

Feature or enhancement

Proposal:

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.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs