Add loongarch64 to supported Python platform tags (#10223)

This commit is contained in:
吴小白 2024-12-31 11:00:37 +08:00 committed by GitHub
parent 7f1ee9c6dd
commit a2f436f79b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -90,6 +90,7 @@ pub enum Arch {
#[serde(alias = "amd64")]
X86_64,
S390X,
LoongArch64,
Riscv64,
}
@ -105,6 +106,7 @@ impl fmt::Display for Arch {
Self::X86 => write!(f, "i686"),
Self::X86_64 => write!(f, "x86_64"),
Self::S390X => write!(f, "s390x"),
Self::LoongArch64 => write!(f, "loongarch64"),
Self::Riscv64 => write!(f, "riscv64"),
}
}
@ -124,7 +126,7 @@ impl Arch {
// manylinux_2_31
Self::Riscv64 => Some(31),
// unsupported
Self::Armv5TEL | Self::Armv6L => None,
Self::Armv5TEL | Self::Armv6L | Self::LoongArch64 => None,
}
}
}

View File

@ -274,6 +274,10 @@ impl From<&uv_platform_tags::Arch> for Arch {
family: target_lexicon::Architecture::X86_64,
variant: None,
},
uv_platform_tags::Arch::LoongArch64 => Self {
family: target_lexicon::Architecture::LoongArch64,
variant: None,
},
uv_platform_tags::Arch::Riscv64 => Self {
family: target_lexicon::Architecture::Riscv64(
target_lexicon::Riscv64Architecture::Riscv64,