rules_python
rules_python copied to clipboard
getting error indicating that uname is not in path on WSL
Running Linux in WSL, set up all Bazel dependencies running bazel build command
hitting error
ERROR: An error occurred during the fetch of repository 'python3_12':
Traceback (most recent call last):
File "/home/williamohara/.cache/bazel/_bazel_williamohara/de29fde09bd221a16d787c59318532b3/external/rules_python/python/private/toolchains_repo.bzl", line 117, column 39, in _toolchain_aliases_impl
(os_name, arch) = get_host_os_arch(rctx)
File "/home/williamohara/.cache/bazel/_bazel_williamohara/de29fde09bd221a16d787c59318532b3/external/rules_python/python/private/toolchains_repo.bzl", line 419, column 50, in get_host_os_arch
arguments = [repo_utils.which_checked(rctx, "uname"), "-m"],
File "/home/williamohara/.cache/bazel/_bazel_williamohara/de29fde09bd221a16d787c59318532b3/external/rules_python/python/private/repo_utils.bzl", line 163, column 13, in _which_checked
fail((
Error in fail: Unable to find the binary 'uname' on PATH.
it seems to be generated by this point in the toolchains_repo.bzl file https://github.com/bazelbuild/rules_python/blob/5eff339f75ea663151b9df7e68c18c417ea91d62/python/private/toolchains_repo.bzl#L430
I have uname in my path - is there some dependency I am missing?
It seems that python/private/toolchains_repo.bzl has _get_host_os_arch which could be updated to drop dependency on uname.