Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
mrmathematica wants to merge1 commit intoastral-sh:main
base:main
Choose a base branch
Loading
frommrmathematica:relocatable

Conversation

@mrmathematica
Copy link

@mrmathematicamrmathematica commentedNov 14, 2025
edited
Loading

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_sysconfig andpatch_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.

@AlexWaygoodAlexWaygood changed the titleMake the Unix build truely relocatalbeMake the Unix build truly relocatableNov 21, 2025
@jjhelmus
Copy link
Contributor

@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
Copy link
Author

@jjhelmus
Do you mean a patch file here first, or a patch to CPython itself? A patch to CPython, even if merged, will likely only be adopted for python 3.15+, thus not helping all existing python versions. If you mean a patch file applied in this repo, I think we can work together for that.

@jjhelmus
Copy link
Contributor

A patch here first is what I was referring to.

@mrmathematica
Copy link
Author

mrmathematica commentedDec 14, 2025
edited
Loading

OK@jjhelmus I give that atry.

I see there can be all kinds of downstream places that touches_sysconfigdata_ again, includinghttps://github.com/python/cpython/blob/a03efb533a58fd13fb0cc7f4a5c02c8406a407bd/Mac/BuildScript/build-installer.py#L1360C1-L1385C15 as mentioned in one of the touched file. All such places need to be modified to work with the new_sysconfigdata_.py file format and f-string inside dict, which is kind of fragile.

On the otherhand, the change in this PR is much more robust. It happened at the same place in this repo where_sysconfigdata_.py is hacked, which is the last step in the process.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mrmathematica@jjhelmus

[8]ページ先頭

©2009-2025 Movatter.jp