We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c56b85 commit 366aef9Copy full SHA for 366aef9
1 file changed
src/common.bzl
@@ -60,11 +60,12 @@ def python_path(ctx):
60
python_path = py_runtime_info.interpreter
61
elif hasattr(py_toolchain, "py3_runtime"):
62
py_runtime = py_toolchain.py3_runtime
63
- python_path = py_runtime.interpreter_path
64
-
65
- # @rules_python does not provide interpreter_path, but interpreter.path
66
- if python_path == None:
+ if hasattr(interpreter_path, python_path):
+ python_path = py_runtime.interpreter_path
+ elif hasattr(interpreter.path, python_path):
67
python_path = py_runtime.interpreter.path
+ else:
68
+ fail("Failed to retrieve python path!")
69
else:
70
fail("The resolved Python toolchain does not provide a Python3 runtime.")
71
if not python_path:
0 commit comments