Skip to content

gh-119696: Install build-details.json with relative paths - #161907

Draft
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:build-details-relative-paths
Draft

itamaro wants to merge 1 commit into
python:mainfrom
itamaro:build-details-relative-paths

Conversation

@itamaro

@itamaro itamaro commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

make install writes build-details.json (PEP 739) with absolute paths, so the file is wrong once the installation is moved. Fixing that is one of the steps towards relocatable CPython installations.

PEP 739 allows the paths to be relative to base_prefix, and base_prefix to be relative to the file's directory; generate-build-details.py already implements that behind --relative-paths --config-file-path. Pass those flags from the Makefile.

The installed-file tests now resolve the paths like a consumer would, instead of skipping on a relocated installation.

`make install` writes `build-details.json` (PEP 739) with absolute
paths, so the file is wrong once the installation is moved. Fixing
that is one of the steps towards relocatable CPython installations.

PEP 739 allows the paths to be relative to `base_prefix`, and
`base_prefix` to be relative to the file's directory;
`generate-build-details.py` already implements that behind
`--relative-paths --config-file-path`. Pass those flags from the
Makefile.

The installed-file tests now resolve the paths like a consumer would,
instead of skipping on a relocated installation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant