Make the Unix build truly relocatable as CPython patch#923
Open
mrmathematica wants to merge 4 commits intoastral-sh:mainfrom
Open
Make the Unix build truly relocatable as CPython patch#923mrmathematica wants to merge 4 commits intoastral-sh:mainfrom
mrmathematica wants to merge 4 commits intoastral-sh:mainfrom
Conversation
mrmathematica
commented
Dec 16, 2025
cpython-unix/build-cpython.sh
Outdated
| "python_exe": "install/bin/python%s%s" % (sysconfig.get_python_version(), sys.abiflags), | ||
| "python_major_minor_version": sysconfig.get_python_version(), | ||
| "python_stdlib_platform_config": sysconfig.get_config_var("LIBPL").lstrip("/"), | ||
| "python_stdlib_platform_config": sysconfig.get_config_var("LIBPL"), |
Author
There was a problem hiding this comment.
If this chane is adopted, update_sysconfig function from https://github.com/astral-sh/uv/blob/13e7ad62cb0d3ca8bf5eeee407d658d6d887d5f9/crates/uv-python/src/sysconfig/mod.rs#L44 can be removed altogether.
7436194 to
7bf5c53
Compare
92a4317 to
3cf1f6b
Compare
3cf1f6b to
d3adb64
Compare
mrmathematica
commented
Jan 22, 2026
| if info.get("build-mode") == "shared": | ||
| shared_dir = extra_metadata["python_config_vars"]["DESTSHARED"].strip("/") | ||
| shared_dir = extra_metadata["python_config_vars"]["DESTSHARED"] | ||
| shared_dir = 'install/lib' + shared_dir.split('install/lib', 1)[1] |
Author
There was a problem hiding this comment.
DESTSHARED in PYTHON.json swithed from /install/lib/... to /build/out/python/install/lib so patch it here for tests to pass. Open to suggestions on how to better handle all such DIR in PYTHON.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #857