fix: Make sure wheelmaker uses the default shell env#2477
Merged
rickeylev merged 4 commits intobazel-contrib:mainfrom Dec 7, 2024
Merged
fix: Make sure wheelmaker uses the default shell env#2477rickeylev merged 4 commits intobazel-contrib:mainfrom
rickeylev merged 4 commits intobazel-contrib:mainfrom
Conversation
Clean macOS installs place `python` in `/usr/local/bin`, which is not searched by default when calling `actions.run()`. This caused builds to fail when they were executing python tools on an unmodified macOS host.
Collaborator
|
I'm guessing you're using the "runtime env" toolchain? i.e. the one that looks up python on PATH at runtime? I don't see how the wheel maker would fail otherwise. Normally, the underlying py_binary should have an absolute path reference to its interpreter. This is a bit of a catch 22 because use_default_shell_env introduces OS-specific behavior, which is undesirable. However, the basic way the runtime-env toolchain works is by relying on PATH lookup. Modifying the runtime env toolchain to check PATH, then check some other common locations seems...well, not sure if that's better or not. |
rickeylev
reviewed
Dec 7, 2024
rickeylev
approved these changes
Dec 7, 2024
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.
Clean macOS installs place
pythonin/usr/local/bin, which is not searched by default when callingactions.run(). This caused builds to fail when they were executing python tools on an unmodified macOS host.