mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 12:24:15 +00:00
Misc. changes based on ABI explorations (#10458)
This commit is contained in:
parent
8d25f295af
commit
bee2baa64e
4 changed files with 36 additions and 48 deletions
|
|
@ -521,14 +521,22 @@ impl VersionMapLazy {
|
|||
}
|
||||
|
||||
// Determine a compatibility for the wheel based on tags.
|
||||
let priority = match &self.tags {
|
||||
Some(tags) => match filename.compatibility(tags) {
|
||||
let priority = if let Some(tags) = &self.tags {
|
||||
match filename.compatibility(tags) {
|
||||
TagCompatibility::Incompatible(tag) => {
|
||||
return WheelCompatibility::Incompatible(IncompatibleWheel::Tag(tag))
|
||||
}
|
||||
TagCompatibility::Compatible(priority) => Some(priority),
|
||||
},
|
||||
None => None,
|
||||
}
|
||||
} else {
|
||||
// Check if the wheel is compatible with the `requires-python` (i.e., the Python
|
||||
// ABI tag is not less than the `requires-python` minimum version).
|
||||
if !self.requires_python.matches_wheel_tag(filename) {
|
||||
return WheelCompatibility::Incompatible(IncompatibleWheel::Tag(
|
||||
IncompatibleTag::AbiPythonVersion,
|
||||
));
|
||||
}
|
||||
None
|
||||
};
|
||||
|
||||
// Check if hashes line up. If hashes aren't required, they're considered matching.
|
||||
|
|
@ -546,14 +554,6 @@ impl VersionMapLazy {
|
|||
}
|
||||
};
|
||||
|
||||
// Check if the wheel is compatible with the `requires-python` (i.e., the Python ABI tag
|
||||
// is not less than the `requires-python` minimum version).
|
||||
if !self.requires_python.matches_wheel_tag(filename) {
|
||||
return WheelCompatibility::Incompatible(IncompatibleWheel::Tag(
|
||||
IncompatibleTag::AbiPythonVersion,
|
||||
));
|
||||
}
|
||||
|
||||
// Break ties with the build tag.
|
||||
let build_tag = filename.build_tag.clone();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue