Allow use of x86-64 Python on ARM Windows (#11625)

Closes https://github.com/astral-sh/uv/issues/11493
This commit is contained in:
Zanie Blue 2025-02-19 12:01:46 -06:00 committed by GitHub
parent 80b0d4c4e2
commit fdebc0c7fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 7 deletions

View file

@ -250,7 +250,10 @@ impl ManagedPythonInstallations {
.find_all()?
.filter(move |installation| {
installation.key.os == os
&& installation.key.arch.family == arch.family
&& (arch.supports(installation.key.arch)
// TODO(zanieb): Allow inequal variants, as `Arch::supports` does not
// implement this yet. See https://github.com/astral-sh/uv/pull/9788
|| arch.family == installation.key.arch.family)
&& installation.key.libc == libc
});
@ -665,6 +668,7 @@ impl ManagedPythonInstallation {
}
}
// TODO(zanieb): Only used in tests now.
/// Generate a platform portion of a key from the environment.
pub fn platform_key_from_env() -> Result<String, Error> {
let os = Os::from_env();