Omit variant when detecting compatible Python installs (#10722)

## Summary

Closes https://github.com/astral-sh/uv/issues/10586.
This commit is contained in:
Charlie Marsh 2025-01-21 10:01:18 -05:00 committed by GitHub
parent 7a14ea639e
commit 9799048f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -242,16 +242,16 @@ impl ManagedPythonInstallations {
pub fn find_matching_current_platform(
&self,
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation>, Error> {
let platform_key = platform_key_from_env()?;
let os = Os::from_env();
let arch = Arch::from_env();
let libc = Libc::from_env()?;
let iter = ManagedPythonInstallations::from_settings(None)?
.find_all()?
.filter(move |installation| {
installation
.path
.file_name()
.map(OsStr::to_string_lossy)
.is_some_and(|filename| filename.ends_with(&platform_key))
installation.key.os == os
&& installation.key.arch.family == arch.family
&& installation.key.libc == libc
});
Ok(iter)