Skip to content

Commit

Permalink
fix(toolchain): attempt to fix the host toolchain on windows
Browse files Browse the repository at this point in the history
Use the same binary path that the regular toolchain is using
in an attempt to see if the behaviour is any different.

Attempt to fix #1723
  • Loading branch information
aignas committed Feb 5, 2024
1 parent e7f8f0f commit 13609c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/private/toolchains_repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,16 @@ exports_files(["python"], visibility = ["//visibility:public"])

(os_name, arch) = get_host_os_arch(rctx)
host_platform = get_host_platform(os_name, arch)

is_windows = (os_name == WINDOWS_NAME)
python3_binary_path = "python.exe" if is_windows else "bin/python3"

host_python = rctx.path(
Label(
"@@{py_repository}_{host_platform}//:python".format(
"@@{py_repository}_{host_platform}//:{python}".format(
py_repository = rctx.attr.name[:-len("_host")],
host_platform = host_platform,
python = python3_binary_path,
),
),
)
Expand Down

0 comments on commit 13609c7

Please sign in to comment.