From 13609c7327a8fc34d1d01a820799d3dc37f90fe6 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:53:30 +0900 Subject: [PATCH] fix(toolchain): attempt to fix the host toolchain on windows 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 --- python/private/toolchains_repo.bzl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/private/toolchains_repo.bzl b/python/private/toolchains_repo.bzl index c586208a7b..4c039ea84a 100644 --- a/python/private/toolchains_repo.bzl +++ b/python/private/toolchains_repo.bzl @@ -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, ), ), )