Ignore tags in universal resolution (#4174)

## Summary

If a package lacks a source distribution, and we can't find a compatible
wheel for the current platform, we need to just _assume_ that the
package will have a valid wheel on all platforms on which it's
requested; if not, we raise an error at install time.

It's possible that we can be smarter about this over time. For example,
if the package was requested _only_ for macOS, we could verify that
there's at least one macOS-compatible wheel. See the linked issue for
more details.

Closes https://github.com/astral-sh/uv/issues/4139.
This commit is contained in:
Charlie Marsh 2024-06-10 05:38:21 -07:00 committed by GitHub
parent bbd961c251
commit 5269a0dba8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 42 additions and 40 deletions

View file

@ -44,7 +44,7 @@ pub enum CompatibleDist<'a> {
/// The wheel that should be used.
wheel: &'a RegistryBuiltWheel,
/// The platform priority associated with the wheel.
priority: TagPriority,
priority: Option<TagPriority>,
/// The prioritized distribution that the wheel came from.
prioritized: &'a PrioritizedDist,
},
@ -145,7 +145,7 @@ pub enum PythonRequirementKind {
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum WheelCompatibility {
Incompatible(IncompatibleWheel),
Compatible(HashComparison, TagPriority, Option<BuildTag>),
Compatible(HashComparison, Option<TagPriority>, Option<BuildTag>),
}
#[derive(Debug, PartialEq, Eq, Clone)]