Skip to content

Preserve historical sysconfig compiler mappings#19657

Merged
zsol merged 1 commit into
mainfrom
zsol/preserve-historical-sysconfig-compiler-mappings
Jun 3, 2026
Merged

Preserve historical sysconfig compiler mappings#19657
zsol merged 1 commit into
mainfrom
zsol/preserve-historical-sysconfig-compiler-mappings

Conversation

@zsol

@zsol zsol commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

Keep the sysconfig generator aware of compiler paths that appeared in older downloadable python-build-standalone releases, so regenerating the mappings on current main does not drop support for previously shipped aarch64 and riscv64 binaries.

Context

uv patches compiler paths embedded in managed Python sysconfig data to use portable cc and c++ commands. These mappings are generated from the current python-build-standalone targets.

Older python-build-standalone releases remain downloadable and retain the compiler paths used when they were built. When a target changes toolchains or is removed from the current targets, regenerating the mappings silently drops support for those releases.

This previously removed the aarch64 GNU mappings. The upcoming python-build-standalone sync in #19531 would similarly replace the riscv64 GNU mappings with LLVM mappings.

Test plan

I've manually verified, that before this patch, on an arm64 linux box:

% uvx python3.12.10 -c 'import sysconfig; print(sysconfig.get_config_var("CC"))'
/usr/bin/aarch64-linux-gnu-gcc -pthread

and after (after uninstalling the python version using uv python uninstall 3.12.10):

% ./target/debug/uvx python3.12.10 -c 'import sysconfig; print(sysconfig.get_config_var("CC"))'
cc -pthread

@zsol zsol marked this pull request as ready for review June 3, 2026 10:28
@zsol zsol requested review from jjhelmus and zanieb June 3, 2026 10:28
@zsol zsol merged commit 8d28332 into main Jun 3, 2026
56 checks passed
@zsol zsol deleted the zsol/preserve-historical-sysconfig-compiler-mappings branch June 3, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants