Skip to content

Commit

Permalink
feat: add loongarch64 platform support
Browse files Browse the repository at this point in the history
Signed-off-by: 吴小白 <296015668@qq.com>
  • Loading branch information
wojiushixiaobai committed Dec 30, 2024
1 parent 4b5a89d commit 43703f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/uv-platform-tags/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pub enum Arch {
#[serde(alias = "amd64")]
X86_64,
S390X,
LoongArch64,
Riscv64,
}

Expand All @@ -103,6 +104,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"),
}
}
Expand All @@ -122,7 +124,7 @@ impl Arch {
// manylinux_2_31
Self::Riscv64 => Some(31),
// unsupported
Self::Armv6L => None,
Self::Armv6L | Self::LoongArch64 => None,
}
}
}
4 changes: 4 additions & 0 deletions crates/uv-python/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,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,
Expand Down

0 comments on commit 43703f1

Please sign in to comment.