bazel-contrib / bazel-contrib/rules_python
Make py_wheel provide depset of files
- 主要言語
- Starlark
- スター
- 688
- フォーク
- 721
- 平均マージ
- 15時間 7分
- マージ済み PR(30日)
- 76
説明
The basic goal is to allow depending on a build-time generated wheel (i.e. `py_wheel` _without_ having to go through the zip/unzip process of creating a wheel archive. Wheels may be large in size, so the process of staging, archiving, and extracting them is unnecessary overhead.
So the idea is `py_wheel` provides `(prefix, files)` information, which can then be used by consumers. This then allows e.g.
```
py_wheel(name="foo_whl", ...)
py_wheel_as_py_library(
name = "foo_whl_as_pylib",
srcs = [":foo_whl"]
)
py_test(
name="foo",
deps = ["foo_whl_as_pylib"],
)
```
Where `py_wheel_as_py_library` returns PyInfo() et al pointing to what the whl would extract to (i.e. a directory with the contents of the wheel).
Looking at py_wheel, this looks quite doable, since Starlark is already generating most (if not all?) of what goes into the wheel, and the `wheelmaker.py` program is mostly just zip's the files up.
コントリビューションガイド
調査の方向性
まず既存の py_wheel の実装と wheelmaker.py を読み、wheel の内容とそのプレフィックスがどのように生成されるかを理解します。py_wheel がプレフィックスとファイルをどのように公開し、py_wheel_as_py_library がそれらを使用してアーカイブをステージングまたは展開せずに PyInfo() を提供するかを定義します。ビルド時に生成された wheel を、提案された依存関係パターンによって py_test が利用できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- build-system
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100