mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 13:43:45 +00:00
Omit variant when detecting compatible Python installs (#10722)
## Summary Closes https://github.com/astral-sh/uv/issues/10586.
This commit is contained in:
parent
7a14ea639e
commit
9799048f92
1 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue