bazel-contrib / bazel-contrib/rules_python
Allow overriding the build rule gazelle uses for libraries/tests/binaries
- 主要语言
- Starlark
- 星标
- 688
- 派生
- 721
- 平均合并
- 15 小时 7 分钟
- 30 天内合并 PR
- 76
描述
# 🚀 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.
贡献指南
调研方向
首先阅读 Gazelle Plugin 以及 issue 中提到的相关规则,重点了解它如何为库、测试和二进制文件选择规则。当作用域特定的注释能够选择 py_image 和 pytest_test 等替代项,同时 Gazelle 仍能管理这些目标的依赖关系时,这项工作就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100