bazel-contrib / bazel-contrib/rules_python
Evaluate the best extraction method for repository rules
- Dominant language
- Starlark
- Stars
- 688
- Forks
- 721
- Avg merge
- 15h 7m
- Merged PRs (30d)
- 76
Description
Alternatives:
* What we have in legacy - Python interpreter + `installer` whl
* What we have in pipstar - `repository_ctx.extract` + `chmod` and `repository_ctx.rename`
* What `uv` is using - https://github.com/astral-sh/uv/blob/0.9.28/crates/uv-extract/src/sync.rs
* A regular `uutils` chmod + unzip
For the last thing we would probably have to setup:
- development rust toolchain.
- binary archiving as part of release. We could probably download the right thing and store hashes using the new `facts` API for `bzlmod`.
- download the binary as a dependency to `whl_library`.
This is a followup to #3554 and #3555.
Contributor guide
Research direction
Start by reading follow-ups #3554 and #3555, then compare the legacy Python interpreter and installer wheel path, pipstar's repository_ctx.extract/chmod/rename path, uv's crates/uv-extract/src/sync.rs, and the uutils chmod/unzip option. Check the release, whl_library, and bzlmod facts API implications described in the issue. Done means selecting and documenting a justified extraction approach with its toolchain, dependency, binary-release, and hash requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100