-
-
Notifications
You must be signed in to change notification settings - Fork 632
Closed
Description
🐞 bug report
Affected Rule
The issue is caused by the rule: `pip.parse` extensionIs this a regression?
No.Description
`pip.parse` allows setting a custom python interpreter. By default it relies on the one in the system. However, to improve hermeticity, I'd like to use the external one that is also used by the hermetic toolchain.🔬 Minimal Reproduction
# MODULE.bazel
bazel_dep(name = "rules_python", version = "0.16.1")
python = use_extension("@rules_python//python:extensions.bzl", "python")
python.toolchain(
name = "python3_8",
python_version = "3.8",
)
use_repo(python, "python3_8_toolchains", "python3_8_x86_64-unknown-linux-gnu")
register_toolchains(
"@python3_8_toolchains//:all",
)
pip = use_extension("@rules_python//python:extensions.bzl", "pip")
pip.parse(
name = "pip",
requirements_lock = "//:requirements_lock.txt",
python_interpreter_target = "@python3_8_x86_64-unknown-linux-gnu//:python",
)
use_repo(pip, "pip")
🔥 Exception or Error
ERROR: error loading package under directory 'bazel/toolchain/python/tests': no such package '@rules_python~0.16.1~pip~pip//': Unable to load package for @[unknown repo 'rules_python~0.16.1~python~python3_8_x86_64-unknown-linux-gnu' requested from @rules_python~0.16.1]//:WORKSPACE: The repository '@[unknown repo 'rules_python~0.16.1~python~python3_8_x86_64-unknown-linux-gnu' requested from @rules_python~0.16.1]' could not be resolved: No repository visible as '@rules_python~0.16.1~python~python3_8_x86_64-unknown-linux-gnu' from repository '@rules_python~0.16.1'
🌍 Your Environment
Operating System:
Ubuntu 20
Output of bazel version
:
6.0.0rc4
Rules_python version:
0.16.1
Anything else relevant?
I've also tried to supply the interpreter as a module on its own, not having it created by rules_python
. Unfortunately, I'm running into the same visibility issues.
What is the correct way to also use the hermetic interpreter for pip?
Metadata
Metadata
Assignees
Labels
No labels