build-details.json should be installed to different locations for nondebug/debug builds and have distinct base_interpreter values · Issue #131372 · python/cpython · GitHub
In Fedora, we build Python in 4 variants: debug, optimized, freethreading-debug and freethreading. For all of them builds the base_interpreter value stored in the file build-details.json is the same:
Another issue is that in both cases, the debug and non-debug files are installed to the same location, resulting in a single rewritten file. In case of our sequential build of 4 Pythons, we end up with just two files. Should they be stored in distinct locations for each build instead?
Another issue is that in both cases, the debug and non-debug files are installed to the same location, resulting in a single rewritten file. In case of our sequential build of 4 Pythons, we end up with just two files. Should they be stored in distinct locations for each build instead?
Just ship the file for the main/default interpreter, I guess? We probably shouldn't install the file in altinstall, and better document expectations for scenarios like yours.
Another issue is that in both cases, the debug and non-debug files are installed to the same location, resulting in a single rewritten file. In case of our sequential build of 4 Pythons, we end up with just two files. Should they be stored in distinct locations for each build instead?
We may do something similar to sysconfigdata filename like including ABI tags. Example:
The "Configurable build-details.json name" change was only merged in the main branch, but the 3.15 is also affected by this issue, no? Should we backport the change to 3.15? (with the typo fix as well)
3.14 and 3.15 include build-details.json. So there is value in backporting that to both.
For me, the main point of the PR was to have an upstream-blessed name for this file that includes the architecture and necessary tags. That goal is now achieved and without needing a backport.
Activity
hugovk commented on Mar 17, 2025
cc @FFY00
FFY00 commented on Apr 29, 2025
Just ship the file for the main/default interpreter, I guess? We probably shouldn't install the file in altinstall, and better document expectations for scenarios like yours.
vstinner commented on Dec 4, 2025
We may do something similar to sysconfigdata filename like including ABI tags. Example:
pythonGH-131372: only install build-details.json in the main install
pythonGH-131372: only install build-details.json in the main install
Merge branch 'main' into pythongh-131372
GH-131372: only install build-details.json in the main install (#142269)
gh-131372: Include LDVERSION and EXE in base_interpreter value (#142256)
stefanor commented on May 10, 2026
FWIW, there is a draft PEP PR to resolve the design: python/peps#4889
stefanor commented on May 20, 2026
#150098 implements a configure flag to allow selecting a more-qualified than just build-details.json filename.
gh-131372: Configurable build-details.json name (#150098)
gh-131372: Fix a typo on "with_build_details_suffix" in configure (#1…
vstinner commented on May 28, 2026
The "Configurable build-details.json name" change was only merged in the main branch, but the 3.15 is also affected by this issue, no? Should we backport the change to 3.15? (with the typo fix as well)
stefanor commented on May 28, 2026
3.14 and 3.15 include build-details.json. So there is value in backporting that to both.
For me, the main point of the PR was to have an upstream-blessed name for this file that includes the architecture and necessary tags. That goal is now achieved and without needing a backport.