feat(pypi): add native local wheel override support to bzlmod pip.parse#3768
Open
meteorcloudy wants to merge 6 commits into
Open
feat(pypi): add native local wheel override support to bzlmod pip.parse#3768meteorcloudy wants to merge 6 commits into
meteorcloudy wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for overriding PyPI dependencies with local wheels located in a specified distribution folder, restricted to the root module. It adds new attributes to the pip extension for specifying the distribution folder and inclusion/exclusion patterns, implements logic to collect and filter local wheels based on ABI markers, and updates the wheel repository generation to use local file URLs. Feedback from the review highlights potential issues with ABI marker generation when patch versions are present and warns against using lexicographical sorting to resolve multiple matching wheels, suggesting instead to fail on ambiguity.
30e1a50 to
7083382
Compare
7083382 to
ace01f7
Compare
d8b2229 to
8310448
Compare
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.
This feature allows developers to easily test locally built Python wheels (e.g., wheels built locally before running integration tests) without needing to publish them to an index or manually edit
requirements_lock.txt.This is a proper implementation of the local_wheel_dist_folder feature used in JAX/TF/XLA.
How to Use
In your
MODULE.bazelfile, configurepip.parsewith the newlocal_wheelsdictionary mapping:Details
dist/libtpu-*.whl) and automatically selects the newest version if multiple matching wheels exist. Silently falls back to remote PyPI if the local file is missing.@@//:MODULE.bazelpip.parseis evaluated by the root module.index_urlis used (which is now by default)