fix: Make sure wheelmaker uses the default shell env (#2477) 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 <richardlev@gmail.com> Co-authored-by: Richard Levasseur <rlevasseur@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bdc5e4..10be235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -56,7 +56,8 @@ {#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
diff --git a/python/private/py_wheel.bzl b/python/private/py_wheel.bzl index 6d047ad..b5fbec9 100644 --- a/python/private/py_wheel.bzl +++ b/python/private/py_wheel.bzl
@@ -514,6 +514,9 @@ 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 [