feat: add support for .whl file extension in repository_ctx.download_and_extract#26308
Closed
albertocavalcante wants to merge 1 commit intobazelbuild:masterfrom
Closed
Conversation
Contributor
Author
|
@meteorcloudy, can you please take a look whenever available? Thanks! |
Member
|
Can you please add a new |
meteorcloudy
approved these changes
Jun 16, 2025
Contributor
Author
|
@meteorcloudy done, thank you! Quick question: To have it shipped on 8.3.0, I need to open another PR to https://github.com/bazelbuild/bazel/tree/release-8.3.0? I'm trying to understand #25839. Thanks again! |
Collaborator
|
@bazel-io fork 8.3.0 |
Contributor
Author
|
@fmeum Thanks Fabian! |
Member
|
Just wanted to point out that |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Jun 17, 2025
…ad_and_extract` The `download_and_extract` function supported various archive formats, but did not recognize `.whl` as a valid file extension for archive extraction. Since wheel files are ZIP archives with a `.whl` extension (per PEP 427), this commit adds support for them by treating `.whl` files the same as other ZIP-based formats. This enables using Python wheel files directly with rules_multitool and other tools without requiring workarounds, particularly useful for air-gapped environments with private PyPI repositories. Changes: - Add .whl to ZIP decompressor condition in DecompressorValue.java - Update error message to include .whl in supported extensions list - Update API documentation to include .whl as supported archive type - Add test case for .whl file extension handling Fixes bazelbuild#26307 RELNOTES[NEW]: `repository_ctx.download_and_extract` now supports the `.whl` file extension for Python wheel files, treating them as ZIP archives under PEP 427. Closes bazelbuild#26308. PiperOrigin-RevId: 772552704 Change-Id: Id21218bb7f13096e0e493745a18325a2575445ed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 17, 2025
…x.download_and_extract` (#26323) The `download_and_extract` function supported various archive formats, but did not recognize `.whl` as a valid file extension for archive extraction. Since wheel files are ZIP archives with a `.whl` extension (per PEP 427), this commit adds support for them by treating `.whl` files the same as other ZIP-based formats. This enables using Python wheel files directly with rules_multitool and other tools without requiring workarounds, particularly useful for air-gapped environments with private PyPI repositories. Changes: - Add .whl to ZIP decompressor condition in DecompressorValue.java - Update error message to include .whl in supported extensions list - Update API documentation to include .whl as supported archive type - Add test case for .whl file extension handling Fixes #26307 RELNOTES[NEW]: `repository_ctx.download_and_extract` now supports the `.whl` file extension for Python wheel files, treating them as ZIP archives under PEP 427. Closes #26308. PiperOrigin-RevId: 772552704 Change-Id: Id21218bb7f13096e0e493745a18325a2575445ed Commit d9634ca Co-authored-by: Alberto Cavalcante <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
download_and_extractfunction supported various archive formats, but did not recognize.whlas a valid file extension for archive extraction. Since wheel files are ZIP archives with a.whlextension (per PEP 427), this commit adds support for them by treating.whlfiles the same as other ZIP-based formats.This enables using Python wheel files directly with rules_multitool and other tools without requiring workarounds, particularly useful for air-gapped environments with private PyPI repositories.
Changes:
Fixes #26307
RELNOTES[NEW]:
repository_ctx.download_and_extractnow supports the.whlfile extension for Python wheel files, treating them as ZIP archives under PEP 427.