python-build-standalone icon indicating copy to clipboard operation
python-build-standalone copied to clipboard

Make the Unix build truly relocatable

Open mrmathematica opened this issue 2 months ago • 4 comments

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.rs update_sysconfig and patch_sysconfigdata function. 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 -isysroot in 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.

mrmathematica avatar Nov 14 '25 22:11 mrmathematica