Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork249
Make the Unix build truly relocatable#857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
jjhelmus commentedDec 3, 2025
@mrmathematica Thanks for putting this together. Working towards a more relocatable distribution is a goal of this project but we also want to balance this with not deviating too far from upstream. Rather than modify sysconfigdata as part of this projects build script a preferred approach would be apply a patch to CPython itself to performs these modification as part of the standard build process. If these modification are part of building CPython directly the patch can be submitted upstream for inclusion in a future release of CPython. See#861 for an example of this type of work where portions of the RPATH adjusts in the build script are migrated to a patch. If this is something you are interested in working on, I'd be happy to assist. |
mrmathematica commentedDec 4, 2025
@jjhelmus |
jjhelmus commentedDec 10, 2025
A patch here first is what I was referring to. |
mrmathematica commentedDec 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I see there can be all kinds of downstream places that touches On the otherhand, the change in this PR is much more robust. It happened at the same place in this repo where |
Uh oh!
There was an error while loading.Please reload this page.
Currently, the python build on Unix is not really relocatalbe. When installing, uv further patches the
_sysconfigdata_file in uv/crates/uv-python/src/sysconfig/mod.rsupdate_sysconfigandpatch_sysconfigdatafunction. Since_sysconfigdata_file is a python file, we can let it dynamically decide the install path here in python-build-standalone, instead of rely on further patch down the line.I see from uv/crates/uv-python/src/sysconfig/mod.rs, it also "remove any references to
-isysrootin a whitespace-separated string". If needed I can add that part of logic to here as well.The aim for this change is that, for python install to be able to be copied into any place after install, it should still work. Doing so here instead of inside uv should make it more avialable.