Skip to content

Commit

Permalink
fix: Make sure wheelmaker uses the default shell env (#2477)
Browse files Browse the repository at this point in the history
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.

---------

Co-authored-by: Richard Levasseur <[email protected]>
Co-authored-by: Richard Levasseur <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2024
1 parent 094a256 commit 42930cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ Unreleased changes template.

{#v0-0-0-fixed}
### Fixed
* Nothing fixed.
* (py_wheel) Use the default shell environment when building wheels to allow
toolchains that search PATH to be used for the wheel builder tool.

{#v0-0-0-added}
### Added
Expand Down
3 changes: 3 additions & 0 deletions python/private/py_wheel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ def _py_wheel_impl(ctx):
outputs = [outfile, name_file],
arguments = [args],
executable = ctx.executable._wheelmaker,
# The default shell env is used to better support toolchains that look
# up python at runtime using PATH.
use_default_shell_env = True,
progress_message = "Building wheel {}".format(ctx.label),
)
return [
Expand Down

0 comments on commit 42930cc

Please sign in to comment.