bazel-contrib / bazel-contrib/rules_python
Make py_wheel provide depset of files
- 主要语言
- Starlark
- 星标
- 688
- 派生
- 721
- 平均合并
- 15 小时 7 分钟
- 30 天内合并 PR
- 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(),而无需对归档进行 staging 或解压。完成的标准是:通过提议的依赖模式,py_test 可以使用构建时生成的 wheel。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100