uv/crates/uv-configuration/src
konsti f2f48d339e
Flatten requirements eagerly in get_dependencies (#4430)
Downstack PR: #4515 Upstack PR: #4481

Consider these two cases:

A:
```
werkzeug==2.0.0
werkzeug @ 960bb4017c/Werkzeug-2.0.0-py3-none-any.whl
```

B:
```toml
dependencies = [
  "iniconfig == 1.1.1 ; python_version < '3.12'",
  "iniconfig @ git+https://github.com/pytest-dev/iniconfig@93f5930e668c0d1ddf4597e38dd0dea4e2665e7a ; python_version >= '3.12'",
]
```

In the first case, `werkzeug==2.0.0` should be overridden by the url. In
the second case `iniconfig == 1.1.1` is in a different fork and must
remain a registry distribution.

That means the conversion from `Requirement` to `PubGrubPackage` is
dependent on the other requirements of the package. We can either look
into the other packages immediately, or we can move the forking before
the conversion to `PubGrubDependencies` instead of after. Either version
requires a flat list of `Requirement`s to use. This refactoring gives us
this list.

I'll add support for both of the above cases in the forking urls branch
before merging this PR. I also have to move constraints over to this.
2024-06-25 21:13:47 +00:00
..
authentication.rs require serde and rkyv everywhere; remove optional serde and rkyv features (#3345) 2024-05-03 10:21:03 -04:00
build_options.rs Add --emit-build-options flag to uv pip compile interface (#4463) 2024-06-24 12:25:01 +00:00
concurrency.rs Add UV_CONCURRENT_INSTALLS variable in favor of RAYON_NUM_THREADS (#3646) 2024-05-17 23:12:37 -04:00
config_settings.rs Make anyhow a dev dependency in uv-configuration (#3814) 2024-05-24 02:49:31 +00:00
constraints.rs Flatten requirements eagerly in get_dependencies (#4430) 2024-06-25 21:13:47 +00:00
extras.rs Move extra specification into uv-configuration (#3897) 2024-05-29 04:49:57 +00:00
lib.rs Move extra specification into uv-configuration (#3897) 2024-05-29 04:49:57 +00:00
name_specifiers.rs Add --no-build, --no-build-package, and binary variants (#4322) 2024-06-14 04:05:00 +00:00
overrides.rs Update Rust crate rustc-hash to v2 (#4461) 2024-06-24 01:13:05 +00:00
package_options.rs Use common routines for pip install and pip sync (#3737) 2024-05-22 12:15:17 -04:00
preview.rs Add preview mode and use for warning in uv run (#3192) 2024-04-22 15:41:15 -05:00
target_triple.rs pep508: un-export fields for MarkerEnvironment 2024-05-09 10:06:02 -04:00