Skip to content

Commit

Permalink
addpatch: uv 0.4.25-1
Browse files Browse the repository at this point in the history
  • Loading branch information
horror-proton committed Oct 23, 2024
1 parent a5d2b35 commit 5abc171
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
18 changes: 18 additions & 0 deletions uv/riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- PKGBUILD
+++ PKGBUILD
@@ -27,6 +27,7 @@

prepare() {
cd "$pkgbase"
+ patch -Np0 -i ../uv-platform-arch-riscv64.patch
local tripple="$(rustc -vV | sed -n 's/host: //p')"
cargo fetch --locked --target "$tripple"
mkdir completions
@@ -82,4 +83,7 @@ package_python-uv() {
rm -rf "$pkgdir/usr/bin"
}

+source+=(uv-platform-arch-riscv64.patch)
+sha256sums+=('0ddf8ac93451de9d84d98741c37cf6487c02fbdd4c4b7abc112a390bf9c49515')
+
# vim: ts=2 sw=2 et:
38 changes: 38 additions & 0 deletions uv/uv-platform-arch-riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- crates/uv-platform-tags/src/platform.rs
+++ crates/uv-platform-tags/src/platform.rs
@@ -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, "riscv"),
}
}
}
@@ -116,6 +118,7 @@ impl Arch {
Self::X86 | Self::X86_64 => Some(5),
// unsupported
Self::Armv6L => None,
+ Self::Riscv64 => None,
}
}
}
--- crates/uv-python/src/platform.rs
+++ crates/uv-python/src/platform.rs
@@ -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,
+ )),
}
}
}

0 comments on commit 5abc171

Please sign in to comment.