mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-22 20:45:25 +00:00
## 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 https://github.com/astral-sh/puffin/issues/511. |
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| test_sdist_building.sh | ||