Description
🐞 bug report
When running bazel sync with python_register_toolchains used in a WORKSPACE file, bazel attempts to fetch repositories for every platform defined in versions.bzl, rather than just the host platform.
Affected Rule
python_register_toolchains
Is this a regression?
No
Description
This issue causes Windows sync specifically to break, with the error Error in fail: Unable to find the binary 'chmod' on PATH.
due to trying to load rules from other platforms/architectures. BAZEL_SH is defined and set to C:\Program Files\Git\bin\bash.exe
and chmod also works when used inside the git bash environment.
🔬 Minimal Reproduction
https://github.com/KKhanhH/rules_python_bug
🔥 Exception or Error
└─$ bazel sync
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-LvQP3NeX4H8Lar2kRtHYTi2VcNI0/d+PzSqiYtqFLRw="
DEBUG: Repository rules_python instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:5:13: in
Repository rule http_archive defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/bazel_tools/tools/build_defs/repo/http.bzl:387:31: in
INFO: Repository python_3_12_x86_64-apple-darwin instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_x86_64-apple-darwin' used the following cache hits instead of downloading the corresponding file.
* Hash '3ba35c706577d755e8e52a4c161a042464577c0e695e2a605362fa469e26de10' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-x86_64-apple-darwin-install_only.tar.gz
If the definition of 'repository @@python_3_12_x86_64-apple-darwin' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_x86_64-apple-darwin':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
INFO: Repository python_3_12_aarch64-apple-darwin instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_aarch64-apple-darwin' used the following cache hits instead of downloading the corresponding file.
* Hash 'e3c4aa607717b23903ca2650d5c3ee24f89b97543e2db2b0f463bddc7a9e92f3' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-aarch64-apple-darwin-install_only.tar.gz
If the definition of 'repository @@python_3_12_aarch64-apple-darwin' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_aarch64-apple-darwin':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7SVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
no actions running
no actions running
Fetching repository @@python_3_12_aarch64-unknown-linux-gnu; starting 27s
no actions running
Fetching repository @@python_3_12_aarch64-unknown-linux-gnu; starting 27s
no actions running
no actions running
no actions running
no actions running
INFO: Repository python_3_12_s390x-unknown-linux-gnu instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: Repository python_3_12_aarch64-unknown-linux-gnu instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_aarch64-unknown-linux-gnu' used the following cache hits instead of downloading the corresponding file.
* Hash 'ce674b55442b732973afb2932c281bb1ded4ad7e22bcf9b07071165770758c7e' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-aarch64-unknown-linux-gnu-install_only.tar.gz
If the definition of 'repository @@python_3_12_aarch64-unknown-linux-gnu' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_aarch64-unknown-linux-gnu':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
INFO: repository @@python_3_12_s390x-unknown-linux-gnu' used the following cache hits instead of downloading the corresponding file.
* Hash '73102f5dbd7d1e7e9c2f2c80aedf2893d99a7fa407f6674ec8b2f57ba07daee5' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-s390x-unknown-linux-gnu-install_only.tar.gz
If the definition of 'repository @@python_3_12_s390x-unknown-linux-gnu' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_s390x-unknown-linux-gnu':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
INFO: Repository python_3_12_ppc64le-unknown-linux-gnu instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_ppc64le-unknown-linux-gnu' used the following cache hits instead of downloading the corresponding file.
* Hash 'b7214790b273de9ed0532420054b72ba1393d62d2fc844ec55ade193771bd90c' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-ppc64le-unknown-linux-gnu-install_only.tar.gz
If the definition of 'repository @@python_3_12_ppc64le-unknown-linux-gnu' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_ppc64le-unknown-linux-gnu':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
INFO: Repository python_3_12_x86_64-unknown-linux-musl instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_x86_64-unknown-linux-musl' used the following cache hits instead of downloading the corresponding file.
* Hash '6f305888703691dd04cfff85284d23ea0b0146ed7c4415e472f1fb72b3f32cdf' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-x86_64-unknown-linux-musl-install_only.tar.gz
If the definition of 'repository @@python_3_12_x86_64-unknown-linux-musl' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_x86_64-unknown-linux-musl':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
INFO: Repository python_3_12_x86_64-unknown-linux-gnu instantiated at:
C:/users/khanh/projects/rules_python_bug/WORKSPACE:14:27: in
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_register_toolchains.bzl:133:26: in python_register_toolchains
Repository rule python_repository defined at:
C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl:267:36: in
INFO: repository @@python_3_12_x86_64-unknown-linux-gnu' used the following cache hits instead of downloading the corresponding file.
* Hash 'b9d6ee5ddac1198e72d53112698773fc8bb597de095592eb849ca794306699ba' for https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.12.8+20241206-x86_64-unknown-linux-gnu-install_only.tar.gz
If the definition of 'repository @@python_3_12_x86_64-unknown-linux-gnu' was updated, verify that the hashes were also updated.
ERROR: C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl:253:13: An error occurred during the fetch of repository 'python_3_12_x86_64-unknown-linux-gnu':
Traceback (most recent call last):
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/python_repository.bzl", line 137, column 54, in _python_repository_impl
arguments = [repo_utils.which_checked(rctx, "chmod"), "-R", "ugo-w", lib_dir],
File "C:/users/khanh/_bazel_khanh/rbx3hbgj/external/rules_python/python/private/repo_utils.bzl", line 253, column 13, in _which_checked
fail(result.describe_failure())
Error in fail: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
no actions running
ERROR: Unable to find the binary 'chmod' on PATH.
PATH = C:\Users\khanh\AppData\Local\bazelisk\downloads\sha256\9864ffcf09469e06f6d1f61adf2933cbf203b80035dab70a2e995c18468facfd\bin;C:\Users\khanh\AppData\Local\fnm_multishells\13052_1741806823736;C:\Program Files\PowerShell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Sysell\7;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;c:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Webex\Plugins;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\RemoteClient\cteapis;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\khanh\AppData\Local\Programs\Python\Python310\;C:\Users\khanh\scoop\shims;C:\Users\khanh\AppData\Local\pnpm;C:\Users\khanh\.cargo\bin;C:\Users\khanh\AppData\Local\Microsoft\WindowsApps;C:\Users\khanh\AppData\Roaming\npm;C:\msys64\ucrt64\bin;C:\Users\khanh\AppData\Local\Programs\oh-my-posh\bin;C:\Users\khanh\AppData\Local\Microsoft\WinGet\Links;C:\Users\khanh\AppData\Local\Programs\Microsoft VS Code\bin;
🌍 Your Environment
Operating System:
Window 11
Output of bazel version
:
Tested on 7.5.0 and 6.4.0
Rules_python version:
Tested on 1.2.0 and 1.0.0