(feat request) Add a gazelle directive for using requirement()
for pip-installable dependencies
#1789
Labels
requirement()
for pip-installable dependencies
#1789
🚀 feature request
Relevant Rules
Description
Gazelle generates deps using the library labels directly, rather than using
requirement()
(possibly because of the drawbacks ofrequirement()
).It would be great if we could configure this on a per-package basis. Users would then be able to opt-in to using
requirement()
, making the transition from manually-built BUILD files to gazelle-generated files much easier (as the diff will be much smaller or nonexistent1).Describe the solution you'd like
Add a new directive
gazelle:python_use_pip_requirement_function
(or similar name) that accepts 3 values:false
(the default): Use library labels directly. Same as current behavior.true
: Userequirement("library")
DEFAULT
orRESET
: reset to the default as defined byrules_python
.Example:
Describe alternatives you've considered
None 🙃. I'm happy to hear some though.
Footnotes
The docs guide users to use
requirement()
initially, and I'm not sure how many people opt to use labels instead. ↩The text was updated successfully, but these errors were encountered: