bazel-contrib / bazel-contrib/rules_python
Make py_wheel provide depset of files
- Ngôn ngữ chính
- Starlark
- Star
- 688
- Fork
- 721
- Merge trung bình
- 15 giờ 7 phút
- Pull request đã merge (30 ngày)
- 76
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách đọc phần triển khai hiện có của py_wheel và wheelmaker.py để hiểu cách nội dung wheel và tiền tố của chúng được tạo ra. Xác định cách py_wheel cung cấp tiền tố và các tệp, cũng như cách py_wheel_as_py_library sử dụng chúng để cung cấp PyInfo() mà không cần staging hoặc giải nén một archive. Công việc được xem là hoàn tất khi một wheel được tạo tại thời điểm build có thể được py_test sử dụng thông qua mẫu dependency được đề xuất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100