aspect-build / aspect-build/rules_py
[FR]: Setting transitive dependencies as `virtual`
- Dominant language
- Starlark
- Stars
- 145
- Forks
- 97
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 71
Description
### 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": "",
"baz": "",
}),
deps = [":libfoo"],
)
```
### Describe the feature
In the above example, I want to create a venv with `foo`, but using my custom `bar` and `baz`.
Contributor guide
Research direction
The issue gives no repository file, test, or entry point to begin from. Start by locating the implementation of virtual_deps and resolutions.override, then trace how transitive Python dependencies are assembled. Done means custom bar and baz wheels fully replace the transitively introduced packages in the generated venv.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100