-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-124932: Distinguish build prefix from host prefix in cross builds #124933
Conversation
I think the issue title is a bit misleading as this is only for WASI and Emscripten (which isn't officially tier 3 again yet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed the ability to differentiate between build-time and run-time general capability would be useful in other cross-build situations (notably, iOS and Android). One Q to resolve inline about WASI support; there's also a need for a NEWS entry.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need clarification on the use of commoninstall
as a make
target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop the WASI parts of this to keep it simple.
49b66c9
to
abf8115
Compare
Okay I removed all wasi-related stuff. |
@brettcannon I removed all wasi stuff, can you resolve the request-changes? @freakboy3742 I added a news entry, I think that was your remaining request? |
Hmm but test failures look pretty related to the change. |
…ost prefix In Emscripten and wasi builds, and presumably for other cross builds, the build file system and the host file system look different. For instance, we may want to install into `cross-build/$TARGET/lib` and then mount that as `/lib` in the host file system. `wasi.py` has to mess around with setting `PYTHONPATH` because `prefix` is set to a path from the build machine. It would simplify this if we distinguish between: * `prefix` -- the path in the build file system where we want to install the files * `host_prefix` -- the path in the host file system where getpath.c will look for the files And similarly for `exec_prefix` and `host_exec_prefix`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if this resets my review ...
I manually reset my review state, so hopefully that will unblock this on my end. |
Thanks! Looks fixed to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@brettcannon Just confirming you were happy with this, and the shenanigans around the review state is just Github being "helpful"? |
@freakboy3742 I just approved to help GH along with its "helpfulness". 😉 |
Thanks @freakboy3742 and @brettcannon! |
In Emscripten and wasi builds, and presumably for other cross builds, the build file system and the host file system look different. For instance, we may want to install into
cross-build/$TARGET/lib
and then mount that as/lib
in the host file system.wasi.py
has to mess around with settingPYTHONPATH
becauseprefix
is set to a path from the build machine. It would simplify this if we distinguish between:prefix
-- the path in the build file system where we want to install the fileshost_prefix
-- the path in the host file system where getpath.c will look for the filesAnd similarly for
exec_prefix
andhost_exec_prefix
.