From 7a17b29aedcce109ed64fa8deaf30e62cf26f5c0 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Mon, 24 Nov 2025 07:33:01 +0000 Subject: [PATCH] source/exe: Make version tool hermetic Signed-off-by: Ryan Northey --- source/common/version/BUILD | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/common/version/BUILD b/source/common/version/BUILD index c5bcc2cbbcd09..da39bf367b3e0 100644 --- a/source/common/version/BUILD +++ b/source/common/version/BUILD @@ -22,7 +22,12 @@ genrule( name = "generate_api_version_number", srcs = ["//:API_VERSION.txt"], outs = ["api_version_number.h"], - cmd = """./$(location //tools/api_versioning:generate_api_version_header_bin) $< >$@""", + cmd = """ + PYPATH=$$(realpath $$(dirname $(PYTHON3))) + export PATH=$$PYPATH:$$PATH + ./$(location //tools/api_versioning:generate_api_version_header_bin) $< >$@ + """, + toolchains = ["@rules_python//python:current_py_toolchain"], tools = ["//tools/api_versioning:generate_api_version_header_bin"], visibility = ["//visibility:private"], )