diff --git a/crates/uv-configuration/src/target_triple.rs b/crates/uv-configuration/src/target_triple.rs index 410490866..41880e7d3 100644 --- a/crates/uv-configuration/src/target_triple.rs +++ b/crates/uv-configuration/src/target_triple.rs @@ -628,6 +628,44 @@ impl TargetTriple { } } + /// Return `true` if the platform is compatible with manylinux. + pub fn manylinux_compatible(self) -> bool { + match self { + Self::Windows | Self::X8664PcWindowsMsvc => false, + Self::Linux | Self::X8664UnknownLinuxGnu => true, + Self::Macos | Self::Aarch64AppleDarwin => false, + Self::I686PcWindowsMsvc => false, + Self::X8664AppleDarwin => false, + Self::Aarch64UnknownLinuxGnu => true, + Self::Aarch64UnknownLinuxMusl => true, + Self::X8664UnknownLinuxMusl => true, + Self::X8664Manylinux217 => true, + Self::X8664Manylinux228 => true, + Self::X8664Manylinux231 => true, + Self::X8664Manylinux232 => true, + Self::X8664Manylinux233 => true, + Self::X8664Manylinux234 => true, + Self::X8664Manylinux235 => true, + Self::X8664Manylinux236 => true, + Self::X8664Manylinux237 => true, + Self::X8664Manylinux238 => true, + Self::X8664Manylinux239 => true, + Self::X8664Manylinux240 => true, + Self::Aarch64Manylinux217 => true, + Self::Aarch64Manylinux228 => true, + Self::Aarch64Manylinux231 => true, + Self::Aarch64Manylinux232 => true, + Self::Aarch64Manylinux233 => true, + Self::Aarch64Manylinux234 => true, + Self::Aarch64Manylinux235 => true, + Self::Aarch64Manylinux236 => true, + Self::Aarch64Manylinux237 => true, + Self::Aarch64Manylinux238 => true, + Self::Aarch64Manylinux239 => true, + Self::Aarch64Manylinux240 => true, + } + } + /// Return a [`MarkerEnvironment`] compatible with the given [`TargetTriple`], based on /// a base [`MarkerEnvironment`]. /// diff --git a/crates/uv/src/commands/pip/mod.rs b/crates/uv/src/commands/pip/mod.rs index a9e74a012..82b8836a4 100644 --- a/crates/uv/src/commands/pip/mod.rs +++ b/crates/uv/src/commands/pip/mod.rs @@ -48,7 +48,7 @@ pub(crate) fn resolution_tags<'env>( (python_version.major(), python_version.minor()), interpreter.implementation_name(), interpreter.implementation_tuple(), - interpreter.manylinux_compatible(), + python_platform.manylinux_compatible(), interpreter.gil_disabled(), )?), (Some(python_platform), None) => Cow::Owned(Tags::from_env( @@ -56,7 +56,7 @@ pub(crate) fn resolution_tags<'env>( interpreter.python_tuple(), interpreter.implementation_name(), interpreter.implementation_tuple(), - interpreter.manylinux_compatible(), + python_platform.manylinux_compatible(), interpreter.gil_disabled(), )?), (None, Some(python_version)) => Cow::Owned(Tags::from_env( @@ -83,7 +83,7 @@ pub(crate) fn resolution_environment( (python_version.major(), python_version.minor()), interpreter.implementation_name(), interpreter.implementation_tuple(), - interpreter.manylinux_compatible(), + python_platform.manylinux_compatible(), interpreter.gil_disabled(), )?), (Some(python_platform), None) => Cow::Owned(Tags::from_env( @@ -91,7 +91,7 @@ pub(crate) fn resolution_environment( interpreter.python_tuple(), interpreter.implementation_name(), interpreter.implementation_tuple(), - interpreter.manylinux_compatible(), + python_platform.manylinux_compatible(), interpreter.gil_disabled(), )?), (None, Some(python_version)) => Cow::Owned(Tags::from_env(