uv/crates/uv-resolver/src
Charlie Marsh 172305abb6
Allow users to mark platforms as "required" for wheel coverage (#10067)
## Summary

This PR revives https://github.com/astral-sh/uv/pull/10017, which might
be viable now that we _don't_ enforce any platforms by default.

The basic idea here is that users can mark certain platforms as required
(empty, by default). When resolving, we ensure that the specified
platforms have wheel coverage, backtracking if not.

For example, to require that we include a version of PyTorch that
supports Intel macOS:

```toml
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = ["torch>1.13"]

[tool.uv]
required-platforms = [
    "sys_platform == 'darwin' and platform_machine == 'x86_64'"
]
```

Other than that, the forking is identical to past iterations of this PR.

This would give users a way to resolve the tail of issues in #9711, but
with manual opt-in to supporting specific platforms.
2025-02-14 15:11:18 -05:00
..
lock Allow users to mark platforms as "required" for wheel coverage (#10067) 2025-02-14 15:11:18 -05:00
pubgrub Allow users to mark platforms as "required" for wheel coverage (#10067) 2025-02-14 15:11:18 -05:00
resolution Fix marker merging for requirements.txt for psycopg (#11298) 2025-02-06 22:31:53 +01:00
resolver Allow users to mark platforms as "required" for wheel coverage (#10067) 2025-02-14 15:11:18 -05:00
candidate_selector.rs Prefer preferences with greater package versions (#10963) 2025-01-25 16:37:25 -05:00
dependency_mode.rs Store resolution options in lockfile (#5264) 2024-07-22 08:28:22 -04:00
dependency_provider.rs All (virtual) packages must have a priority (#10853) 2025-01-23 16:09:47 +00:00
error.rs uv-resolver: remove the conservative checking of unconditional extras 2025-01-22 18:52:05 -05:00
exclude_newer.rs switch to jiff from chrono (#6205) 2024-08-20 11:31:46 -05:00
exclusions.rs Avoid downgrading packages when `--upgrade` is provided (#10097) 2025-01-06 17:41:43 -05:00
flat_index.rs Reduce `WheelFilename` to 48 bytes (#10583) 2025-01-14 14:49:17 +00:00
fork_indexes.rs uv: use ResolverEnvironment instead of ResolverMarkers 2024-11-04 11:09:06 -05:00
fork_strategy.rs Introduce a `--fork-strategy` preference mode (#9868) 2024-12-13 16:05:07 -05:00
fork_urls.rs uv: use ResolverEnvironment instead of ResolverMarkers 2024-11-04 11:09:06 -05:00
graph_ops.rs uv-resolver: fix conflict marker simplification bug 2025-02-10 09:17:31 -05:00
lib.rs Use Hashbrown's raw entry API to reduce hashes and clone in priority (#10881) 2025-01-23 09:34:37 -05:00
manifest.rs Replace `Option<BTreeSet>` with `BTreeSet` for members (#10150) 2024-12-25 00:37:46 +00:00
marker.rs Avoid narrowing `requires-python` marker with disjunctions (#10704) 2025-01-17 16:25:32 +00:00
options.rs Allow users to mark platforms as "required" for wheel coverage (#10067) 2025-02-14 15:11:18 -05:00
pins.rs Improve file pinning comments (#10387) 2025-01-08 11:42:25 +00:00
preferences.rs Avoid respecting preferences from other indexes (#10782) 2025-01-20 12:23:00 -05:00
prerelease.rs do not imply pre-release when `!=` operator is used (#7974) 2024-11-07 14:29:54 -06:00
python_requirement.rs Avoid returning `Some` for narrowing no-ops (#10705) 2025-01-17 16:41:17 +00:00
redirect.rs Use a stable directory for (local) script virtual environments (#11347) 2025-02-12 00:45:26 +00:00
requires_python.rs Use refined specifiers when logging narrowed Python range (#11334) 2025-02-07 17:43:32 -05:00
resolution_mode.rs Respect fork markers in `--resolution-mode=lowest-direct` (#8839) 2024-11-05 21:09:38 +00:00
universal_marker.rs uv-resolver: include conflict markers in fork markers (#10818) 2025-01-21 14:04:31 -05:00
version_map.rs Reduce `WheelFilename` to 48 bytes (#10583) 2025-01-14 14:49:17 +00:00
yanks.rs Upgrade Rust toolchain to 1.84.0 (#10533) 2025-01-11 22:19:33 -05:00