rules_py
rules_py copied to clipboard
[FR]: Setting transitive dependencies as `virtual`
What is the current behavior?
Let's say I have a library foo that depends on bar and baz, and I want to replace bar and baz with my custom packages.
The current behavior doesn’t completely replace bar and baz with my custom packages; instead, it appends them to the transitively introduced bar and baz.
py_library(
name = "libfoo",
srcs = [...],
deps = [requirement("foo")],
virtual_deps = [
"bar",
"baz",
],
)
py_binary(
name = "main",
srcs = ["main.py"],
resolutions = foo_resolutions.override({
"bar": "<path_to_bar_wheel>",
"baz": "<path_to_baz_wheel>",
}),
deps = [":libfoo"],
)
Describe the feature
In the above example, I want to create a venv with foo, but using my custom bar and baz.
@mattem you know this feature the best, do you have an idea of whether this is feasible?