bazel-contrib / bazel-contrib/rules_python

Allow overriding the build rule gazelle uses for libraries/tests/binaries

Aperta
#1,269 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
gazelle type: feature request
Lingua principale
Starlark
Stelle
688
Fork
721
Merge medio
15h 7m
PR unite (30g)
76

Descrizione

# 🚀 feature request

### Relevant Rules

Gazelle Plugin

### Description

There are two issues I'm running into:
1) Some of my binaries need to use `py_image` rather than `py_binary` but gazelle can't manage deps for `py_image`.
2) I have a custom macro called `pytest_test` that I use for my tests that use pytest but Gazelle generates a `py_test` target for those files. I have to manually ignore all of those files and then manually manage the target since the `py_test` rule can properly run them.

### Describe the solution you'd like

It would be great if there was a Gazelle annotation where, for the current scope, Gazelle could be configured to use a different rule for particular target types.

### Describe alternatives you've considered

The only workaround I know of is to instruct Gazelle to ignore the files and then manage the build targets manually.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reading the Gazelle Plugin and the relevant rules named in the issue, focusing on how it selects rules for libraries, tests, and binaries. The work is done when a scope-specific annotation can select alternatives such as py_image and pytest_test while Gazelle still manages dependencies for those targets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.