bazel-contrib / bazel-contrib/rules_python
Allow overriding the build rule gazelle uses for libraries/tests/binaries
- Lenguaje dominante
- Starlark
- Estrellas
- 688
- Forks
- 721
- Merge medio
- 15 h 7 min
- PR fusionados (30 d)
- 76
Descripción
# 🚀 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.
Guía de contribución
Línea de trabajo
Empieza leyendo el Gazelle Plugin y las reglas relevantes mencionadas en el issue, centrándote en cómo selecciona reglas para bibliotecas, tests y binarios. El trabajo estará terminado cuando una anotación específica del ámbito pueda seleccionar alternativas como py_image y pytest_test, mientras Gazelle sigue gestionando las dependencias de esos targets.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100