Repository navigation
Conversation
The pip.override tag class can only patch a single wheel file, so patching a
package needs one override per platform and cannot patch the wheels that are
built from an sdist. Add the 'package' attribute, optionally with a version
('foo@1.2.3'), to patch all of the wheels of a package and the 'hub_name'
attribute to limit it to one hub. The parsing moves to whl_overrides.bzl.
Also look up the overrides by the declared hub name so that they keep working for the reserved 'pypi' hub, validate the package value and keep the encoded args minimal.
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.
pip.overridecan only patch a single wheel file. Patching a package needsone override per platform and Python version, and the wheels that are built
from an sdist cannot be patched at all because their file names are not known
when the module extension runs. rules_pycross users have a single
post_install_patchesper package.This adds
pip.override(package = "foo")(optionallyfoo@1.2.3), whichpatches every wheel of the package, including the wheels built from an sdist,
and
hub_nameto limit it to one hub. The versions are compared with thePEP 440
==semantics. A package override that matches no package in thetargeted hubs fails.
fileoverrides behave as before and pass the same argsto the whl repositories. The parsing of the tags moves to
whl_overrides.bzlso that it can be unit tested.
Stack (fork test PRs): on top of #6.