bazel-contrib / bazel-contrib/rules_python
Make it easier to load wheels from the local file system
- 主要言語
- Starlark
- スター
- 688
- フォーク
- 721
- 平均マージ
- 15時間 7分
- マージ済み PR(30日)
- 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