Description
Feature or enhancement
Proposal:
Right now, some of the data is calculated during import, then we use that to calculate more data when building the sysconfig.get_config_vars
cache. It would be good to transform all of this into a clearly defined algorithm, where we the data is generated based on a set of inputs, making it easier to generate data when cross-compiling, and allowing us to generate data for a specific environment (eg. source builds, vs installed build). This would have helped mitigate issues such as GH-127429, GH-128055, and GH-126789.
Additionally, this also gives us the opportunity to split the data into two sets: the minimum needed to evaluate the install scheme paths, and the non-critical additional data we expose in sysconfig.get_config_vars
. This would help with the bootstrapping issue in python -m sysconfig --generate-posix-vars
.
cpython/Lib/sysconfig/__main__.py
Lines 206 to 221 in f802c8b
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response