Skip to content

Conversation

@shs96c
Copy link
Contributor

@shs96c shs96c commented Dec 6, 2024

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.

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.
@rickeylev
Copy link
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 rickeylev enabled auto-merge December 7, 2024 22:13
@rickeylev rickeylev added this pull request to the merge queue Dec 7, 2024
Merged via the queue into bazel-contrib:main with commit 42930cc Dec 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants