We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 588a42b commit 78ae1f0Copy full SHA for 78ae1f0
1 file changed
python/private/pypi/pip_repository.bzl
@@ -90,11 +90,14 @@ def _pip_repository_impl(rctx):
90
python_interpreter = rctx.attr.python_interpreter,
91
python_interpreter_target = rctx.attr.python_interpreter_target,
92
)
93
- result = rctx.execute([python_interpreter, "--version"])
94
- if result.stdout:
95
- python_version = result.stdout.strip().split(" ")[-1]
96
- else:
97
- fail("Could not determine Python version")
+ result = pypi_repo_utils.execute_checked(
+ rctx,
+ python = python_interpreter,
+ srcs = [],
+ op = "GetPythonVersion",
98
+ arguments = ["-c", "import sys; print(sys.version.split()[0])"],
99
+ )
100
+ python_version = result.stdout.strip().splitlines()[-1]
101
platforms = [
102
"linux_aarch64",
103
"linux_arm",
0 commit comments