Repository navigation
feat(pypi): change the dependencies and tags of a package with pip.override - #8
Draft
aignas wants to merge 2 commits into
Conversation
…erride The dependencies of a package come from its METADATA and cannot be changed without patching the wheel, e.g. to drop a dependency that is only needed for optional features or to add a missing one. Add 'ignore_dependencies', 'extra_dependencies' (PEP 508 requirements with markers) and 'tags' to pip.override(package = ...). They are passed to the whl repositories as attributes that only change the generated BUILD file, so they do not prevent sharing the extracted wheels.
…ings Only accept package names in ignore_dependencies, so that e.g. 'bar[x]' does not silently ignore nothing, and add the settings for a hub to the settings for all hubs, like the patches.
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 dependencies of a package come from its wheel
METADATAand cannot bechanged without patching the wheel, e.g. to drop a dependency that is only
needed for optional features, to break a dependency cycle or to add a missing
dependency. rules_pycross has
ignore_dependencies,extra_dependenciesandwheel_library_tagsfor this.This adds
ignore_dependencies(package names),extra_dependencies(PEP 508requirements, markers allowed) and
tagstopip.override(package = ...).They are passed to the whl repositories as attributes that only change the
generated
BUILD.bazelfile: theRequires-Distlines of the ignored packagesare removed (including the ones for extras) and the extra lines are added, so
they get the same
select()s and filtering as theMETADATAdependencies.The names have to be in the targeted hubs. The settings for a hub are added to
the settings for all hubs.
The
patchdocs page is renamed tooverridewith a redirect.Stack (fork test PRs): on top of #7.