cpython/Lib/sysconfig
hetmankp 0bd1024f87
gh-150162: Fix sysconfig cross-compile impermanence (#150164)
Fixes issue #150162 by improving the code introduced by 70154855cf
(GH-127729) while retaining the original documented intent. The
aforementioned code has a side effect when used in a virtual environment
context, on posix platforms, with the cross-compiling environment
variable _PYTHON_PROJECT_BASE present. In this case, every single
sysconfig.get_config_vars() and sysconfig.get_config_var() call, forces
the _CONFIG_VARS dictionary to be reinitialised from scratch. This is
inefficient, but also means no changes to the dictionary returned by
sysconfig.get_config_vars() persist, which can be useful in certain
situations.

This commit tracks changes to sys.prefix and sys.exec_prefix more
directly rather than relying on a misalignment with the corresponding
sysconfig variables.
2026-06-22 15:59:03 +00:00
..
__init__.py gh-150162: Fix sysconfig cross-compile impermanence (#150164) 2026-06-22 15:59:03 +00:00
__main__.py gh-136097: Fix sysconfig._parse_makefile() (#136166) 2025-10-04 14:57:12 +01:00