-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable package overrides in
pip-compile
(#631)
## Summary This PR enables overrides to be passed to `pip-compile` and `pip-install` via a new `--overrides` flag. When overrides are provided, we effectively replace any requirements that are overridden with the overridden versions. This is applied at all depths of the tree. The merge semantics are such that we replace _all_ requirements of a package with _all_ requirements from the overrides files. So, for example, if a package declares: ``` foo >= 1.0; python_version < '3.11' foo < 1.0; python_version >= '3.11' ``` And the user provides an override like: ``` foo >= 2.0 ``` Then _both_ of the `foo` requirements in the package will be replaced with the override. If instead, the user provided an override like: ``` foo >= 2.0; python_version < '3.11' foo < 3.0; python_version >= '3.11' ``` Then we'd replace _both_ of the original `foo` requirements with both of these overrides. (In technical terms, for each package in the requirements file, we flat-map over its overrides.) Closes #511.
- Loading branch information
1 parent
e51b397
commit 69581c0
Showing
13 changed files
with
284 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.