Add riscv64 to supported Python platform tags (#8660)

Closes #8657
This commit is contained in:
Zanie Blue 2024-10-29 08:48:19 -05:00 committed by GitHub
parent d9ea307615
commit 94ae79d90d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -86,6 +86,7 @@ pub enum Arch {
#[serde(alias = "amd64")]
X86_64,
S390X,
Riscv64,
}
impl fmt::Display for Arch {
@ -99,6 +100,7 @@ impl fmt::Display for Arch {
Self::X86 => write!(f, "i686"),
Self::X86_64 => write!(f, "x86_64"),
Self::S390X => write!(f, "s390x"),
Self::Riscv64 => write!(f, "riscv64"),
}
}
}
@ -115,7 +117,7 @@ impl Arch {
// manylinux 1
Self::X86 | Self::X86_64 => Some(5),
// unsupported
Self::Armv6L => None,
Self::Armv6L | Self::Riscv64 => None,
}
}
}

View file

@ -165,6 +165,9 @@ impl From<&uv_platform_tags::Arch> for Arch {
target_lexicon::X86_32Architecture::I686,
)),
uv_platform_tags::Arch::X86_64 => Self(target_lexicon::Architecture::X86_64),
uv_platform_tags::Arch::Riscv64 => Self(target_lexicon::Architecture::Riscv64(
target_lexicon::Riscv64Architecture::Riscv64,
)),
}
}
}