You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix bug in py_venv when using non runfiles python interpreter (#653)
We were hitting the following error when using a system python instead
of a runfiles python.
`'--venv-shim=external/aspect_rules_py~~py_tools~rules_py_tools.linux_amd64/shim'
/usr/bin/python3
'--pth-file=bazel-out/k8-fastbuild/bin/foo/bar/venv.pth'
'--env-file=bazel-out/k8-fastbuild/bin/foo/bar/venv.env'
'--bin-dir=bazel-out/k8-fastbuild/bin' '--collision-strategy=error'
'--venv-name=.venv' '--mode=static-copy' '--version=3.12')`
`error: unexpected argument '/usr/bin/python3' found`
After debugging, realized that the `--python` argument identifier is
being omitted when a non-runfiles python is used. The problem is in the
`if` / `else` clause. Validated this works using a patch file.
### Test plan
- Covered by existing test cases
0 commit comments