bazel-contrib / bazel-contrib/rules_python
Make it easier to load wheels from the local file system
- 主要语言
- Starlark
- 星标
- 688
- 派生
- 721
- 平均合并
- 15 小时 7 分钟
- 30 天内合并 PR
- 76
描述
# 🚀 feature request
### Relevant Rules
Possibly in `whl_library`, but more likely in `requirements.txt`
### Description
I had created a patched wheel that I wished to test with Bazel and rules_python *before* publishing it to our internal Artifactory package index. There was no easy way to accomplish this.
I eventually worked out that I could test my patched wheel by using [pip2pi](https://pypi.org/project/pip2pi/) to create a local package index on my filesystem, then adding `--index-url=/tmp/pypi/simple` to the beginning of my `requirements.txt`.
See [this writeup](https://github.com/georgevreilly/torch21?tab=readme-ov-file#using-the-patched-wheel-with-rules_python) for full details.
### Describe the solution you'd like
If you have a solution in mind, please describe it.
I think the easiest thing for users is if they can specify a file path in `requirements.txt`; e.g.,
```
sympy==1.12
./tmp/torch-2.1.0+stripe.5-cp38-cp38-manylinux1_x86_64.whl
triton==2.1.0
```
Pip allows this, after all.
### Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?
贡献指南
调研方向
首先阅读 rules_python 中对 whl_library 和 requirements.txt 的处理,以追踪依赖项条目是如何被解析和解决的。检查现有测试是否覆盖本地软件包源;完成的标准是,requirements.txt 中的 wheel 路径可以被 Bazel 规则使用,而无需发布到外部软件包索引。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100