Skip to content

Python 3.14: Use relative paths in build-details.json #712

@geofft

Description

@geofft

PEP 739 specifies a build-details.json file, which is expected to be present for Python 3.14 and up.

The CPython build process automatically creates this but it uses absolute paths:

$ head ~/.local/share/uv/python/cpython-3.14.0b4-linux-x86_64-gnu/lib/python3.14/build-details.json 
{
  "schema_version": "1.0",
  "base_prefix": "/install",
  "base_interpreter": "/install/bin/python3.14",
  "platform": "",
  "language": {
    "version": "3.14",
    "version_info": {
      "major": 3,
      "minor": 14,

The PEP permits a path relative to build-details.json for base_prefix and paths relative to base_prefix for all other fields. We should switch to using relative paths.

I haven't yet looked to see if this is a knob we can turn on at build time or we need to postprocess it. If there is not such a knob we should ideally send a patch to upstream CPython to add one, perhaps as part of a generic ./configure --relocatable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions