maturin: update to 0.10.6.
This commit is contained in:
parent
c0d7f48203
commit
121dae012e
4 changed files with 70 additions and 163 deletions
|
@ -1,30 +1,19 @@
|
||||||
From 88434b211f9e4219fe7b6d9adc737351091324cd Mon Sep 17 00:00:00 2001
|
diff -ur setup.py setup.py
|
||||||
From: Daniel Kolesa <daniel@octaforge.org>
|
|
||||||
Date: Fri, 5 Feb 2021 18:32:38 +0100
|
|
||||||
Subject: [PATCH] add support for tier 3 ppc targets
|
|
||||||
|
|
||||||
---
|
|
||||||
setup.py | 2 +-
|
|
||||||
src/target.rs | 18 ++++++++++++++++++
|
|
||||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git setup.py setup.py
|
|
||||||
index 228267f..8fa1c1e 100644
|
|
||||||
--- setup.py
|
--- setup.py
|
||||||
+++ setup.py
|
+++ setup.py
|
||||||
@@ -65,7 +65,7 @@ class PostInstallCommand(install):
|
@@ -69,7 +69,7 @@
|
||||||
|
"--message-format=json",
|
||||||
cargo_args = [cargo, "rustc", "--bin", "maturin", "--message-format=json"]
|
]
|
||||||
|
|
||||||
- if platform.machine() in ("ppc64le", "ppc64", "powerpc"):
|
- if platform.machine() in ("ppc64le", "ppc64", "powerpc"):
|
||||||
+ if platform.machine() in ("ppc64le", "ppc64", "powerpc", "ppcle", "ppc"):
|
+ if platform.machine() in ("ppc64le", "ppc64", "powerpc", "ppcle", "ppc"):
|
||||||
cargo_args.extend(
|
cargo_args.extend(
|
||||||
["--no-default-features", "--features=upload,log,human-panic"]
|
["--no-default-features", "--features=upload,log,human-panic"]
|
||||||
)
|
)
|
||||||
diff --git src/target.rs src/target.rs
|
diff -ur src/target.rs src/target.rs
|
||||||
--- src/target.rs
|
--- src/target.rs
|
||||||
+++ src/target.rs
|
+++ src/target.rs
|
||||||
@@ -41,6 +41,8 @@
|
@@ -40,6 +40,8 @@
|
||||||
Armv7L,
|
Armv7L,
|
||||||
Powerpc64Le,
|
Powerpc64Le,
|
||||||
Powerpc64,
|
Powerpc64,
|
||||||
|
@ -33,7 +22,7 @@ diff --git src/target.rs src/target.rs
|
||||||
X86,
|
X86,
|
||||||
X86_64,
|
X86_64,
|
||||||
S390X,
|
S390X,
|
||||||
@@ -53,6 +55,8 @@
|
@@ -52,6 +54,8 @@
|
||||||
Arch::Armv7L => write!(f, "armv7l"),
|
Arch::Armv7L => write!(f, "armv7l"),
|
||||||
Arch::Powerpc64Le => write!(f, "ppc64le"),
|
Arch::Powerpc64Le => write!(f, "ppc64le"),
|
||||||
Arch::Powerpc64 => write!(f, "ppc64"),
|
Arch::Powerpc64 => write!(f, "ppc64"),
|
||||||
|
@ -42,42 +31,34 @@ diff --git src/target.rs src/target.rs
|
||||||
Arch::X86 => write!(f, "i686"),
|
Arch::X86 => write!(f, "i686"),
|
||||||
Arch::X86_64 => write!(f, "x86_64"),
|
Arch::X86_64 => write!(f, "x86_64"),
|
||||||
Arch::S390X => write!(f, "s390x"),
|
Arch::S390X => write!(f, "s390x"),
|
||||||
@@ -68,6 +72,8 @@
|
@@ -67,6 +71,8 @@
|
||||||
Arch::Armv7L,
|
Arch::Armv7L,
|
||||||
Arch::Powerpc64,
|
Arch::Powerpc64,
|
||||||
Arch::Powerpc64Le,
|
Arch::Powerpc64Le,
|
||||||
+ Arch::PowerpcLe,
|
+ Arch::PowerpcLe,
|
||||||
+ Arch::Powerpc,
|
+ Arch::Powerpc,
|
||||||
|
Arch::S390X,
|
||||||
Arch::X86,
|
Arch::X86,
|
||||||
Arch::X86_64,
|
Arch::X86_64,
|
||||||
],
|
@@ -123,6 +129,8 @@
|
||||||
@@ -125,6 +131,16 @@
|
target_lexicon::Architecture::Aarch64(_) => Arch::Aarch64,
|
||||||
{
|
target_lexicon::Architecture::Powerpc64 => Arch::Powerpc64,
|
||||||
Arch::Powerpc64Le
|
target_lexicon::Architecture::Powerpc64le => Arch::Powerpc64Le,
|
||||||
}
|
+ target_lexicon::Architecture::PowerpcLe => Arch::PowerpcLe,
|
||||||
+ platforms::target::Arch::POWERPC
|
+ target_lexicon::Architecture::Powerpc => Arch::Powerpc,
|
||||||
+ if platform.target_triple.starts_with("powerpc-") =>
|
target_lexicon::Architecture::S390x => Arch::S390X,
|
||||||
+ {
|
|
||||||
+ Arch::Powerpc
|
|
||||||
+ }
|
|
||||||
+ platforms::target::Arch::POWERPC
|
|
||||||
+ if platform.target_triple.starts_with("powerpcle-") =>
|
|
||||||
+ {
|
|
||||||
+ Arch::PowerpcLe
|
|
||||||
+ }
|
|
||||||
unsupported => bail!("The architecture {} is not supported", unsupported),
|
unsupported => bail!("The architecture {} is not supported", unsupported),
|
||||||
};
|
};
|
||||||
|
@@ -200,7 +208,7 @@
|
||||||
@@ -193,7 +209,7 @@
|
|
||||||
/// Returns the default Manylinux tag for this architecture
|
/// Returns the default Manylinux tag for this architecture
|
||||||
pub fn get_default_manylinux_tag(&self) -> Manylinux {
|
pub fn get_default_manylinux_tag(&self) -> Manylinux {
|
||||||
match self.arch {
|
match self.arch {
|
||||||
- Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::S390X => {
|
- Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::S390X => {
|
||||||
+ Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::Powerpc | Arch::PowerpcLe | Arch::S390X => {
|
+ Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::PowerpcLe | Arch::Powerpc | Arch::S390X => {
|
||||||
Manylinux::Manylinux2014
|
Manylinux::manylinux2014()
|
||||||
}
|
}
|
||||||
Arch::X86 | Arch::X86_64 => Manylinux::Manylinux2010,
|
Arch::X86 | Arch::X86_64 => Manylinux::manylinux2010(),
|
||||||
@@ -207,6 +223,8 @@
|
@@ -214,6 +222,8 @@
|
||||||
Arch::Armv7L => 32,
|
Arch::Armv7L => 32,
|
||||||
Arch::Powerpc64 => 64,
|
Arch::Powerpc64 => 64,
|
||||||
Arch::Powerpc64Le => 64,
|
Arch::Powerpc64Le => 64,
|
||||||
|
|
|
@ -1,116 +0,0 @@
|
||||||
From 27a70f351da0289119f39964a3c661ae05a24856 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Kolesa <daniel@octaforge.org>
|
|
||||||
Date: Fri, 5 Feb 2021 18:46:51 +0100
|
|
||||||
Subject: [PATCH] add ppc*-musl and ppcle support into platform crate
|
|
||||||
|
|
||||||
---
|
|
||||||
platforms/README.md | 10 ++++++++
|
|
||||||
platforms/src/platform.rs | 5 ++++
|
|
||||||
platforms/src/platform/tier3.rs | 45 +++++++++++++++++++++++++++++++++
|
|
||||||
3 files changed, 60 insertions(+)
|
|
||||||
|
|
||||||
diff --git platforms/README.md platforms/README.md
|
|
||||||
index a8a7fba..5038fed 100644
|
|
||||||
--- platforms/README.md
|
|
||||||
+++ platforms/README.md
|
|
||||||
@@ -117,6 +117,11 @@ accompanied by a minor version bump.
|
|
||||||
| [mips-unknown-linux-uclibc] | mips | linux | uclibc |
|
|
||||||
| [mipsel-unknown-linux-uclibc] | mips | linux | uclibc |
|
|
||||||
| [msp430-none-elf] | msp430 | unknown | "" |
|
|
||||||
+| [powerpc-unknown-linux-musl] | powerpc | linux | musl |
|
|
||||||
+| [powerpcle-unknown-linux-gnu] | powerpc | linux | gnu |
|
|
||||||
+| [powerpcle-unknown-linux-musl] | powerpc | linux | musl |
|
|
||||||
+| [powerpc64-unknown-linux-musl] | powerpc64 | linux | musl |
|
|
||||||
+| [powerpc64le-unknown-linux-musl] | powerpc64 | linux | musl |
|
|
||||||
| [sparc64-unknown-netbsd] | sparc64 | netbsd | "" |
|
|
||||||
| [thumbv6m-none-eabi] | thumbv6 | unknown | "" |
|
|
||||||
| [thumbv7em-none-eabi] | thumbv7 | unknown | "" |
|
|
||||||
@@ -206,8 +211,13 @@ additional terms or conditions.
|
|
||||||
[mipsel-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.MIPSEL_UNKNOWN_LINUX_GNU.html
|
|
||||||
[mipsel-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.MIPSEL_UNKNOWN_LINUX_MUSL.html
|
|
||||||
[powerpc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC_UNKNOWN_LINUX_GNU.html
|
|
||||||
+[powerpc-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC_UNKNOWN_LINUX_MUSL.html
|
|
||||||
+[powerpcle-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPCLE_UNKNOWN_LINUX_GNU.html
|
|
||||||
+[powerpcle-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPCLE_UNKNOWN_LINUX_MUSL.html
|
|
||||||
[powerpc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC64_UNKNOWN_LINUX_GNU.html
|
|
||||||
+[powerpc64-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC64_UNKNOWN_LINUX_MUSL.html
|
|
||||||
[powerpc64le-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC64LE_UNKNOWN_LINUX_GNU.html
|
|
||||||
+[powerpc64le-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC64LE_UNKNOWN_LINUX_MUSL.html
|
|
||||||
[s390x-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.S390X_UNKNOWN_LINUX_GNU.html
|
|
||||||
[sparc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.SPARC64_UNKNOWN_LINUX_GNU.html
|
|
||||||
[sparcv9-sun-solaris]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.SPARCV9_SUN_SOLARIS.html
|
|
||||||
diff --git platforms/src/platform.rs platforms/src/platform.rs
|
|
||||||
index 8b1f049..30c0516 100644
|
|
||||||
--- platforms/src/platform.rs
|
|
||||||
+++ platforms/src/platform.rs
|
|
||||||
@@ -142,6 +142,11 @@ impl Platform {
|
|
||||||
tier3::MIPS_UNKNOWN_LINUX_UCLIBC,
|
|
||||||
tier3::MIPSEL_UNKNOWN_LINUX_UCLIBC,
|
|
||||||
tier3::MSP430_NONE_ELF,
|
|
||||||
+ tier3::POWERPC_UNKNOWN_LINUX_MUSL,
|
|
||||||
+ tier3::POWERPCLE_UNKNOWN_LINUX_GNU,
|
|
||||||
+ tier3::POWERPCLE_UNKNOWN_LINUX_MUSL,
|
|
||||||
+ tier3::POWERPC64_UNKNOWN_LINUX_MUSL,
|
|
||||||
+ tier3::POWERPC64LE_UNKNOWN_LINUX_MUSL,
|
|
||||||
tier3::SPARC64_UNKNOWN_NETBSD,
|
|
||||||
tier3::THUMBV6M_NONE_EABI,
|
|
||||||
tier3::THUMBV7EM_NONE_EABI,
|
|
||||||
diff --git platforms/src/platform/tier3.rs platforms/src/platform/tier3.rs
|
|
||||||
index 519db6a..32ba2f7 100644
|
|
||||||
--- platforms/src/platform/tier3.rs
|
|
||||||
+++ platforms/src/platform/tier3.rs
|
|
||||||
@@ -56,6 +56,51 @@ pub const MSP430_NONE_ELF: Platform = Platform {
|
|
||||||
tier: Tier::Three,
|
|
||||||
};
|
|
||||||
|
|
||||||
+/// `powerpc-unknown-linux-musl`: PowerPC Linux with MUSL
|
|
||||||
+pub const POWERPC_UNKNOWN_LINUX_MUSL: Platform = Platform {
|
|
||||||
+ target_triple: "powerpc-unknown-linux-musl",
|
|
||||||
+ target_arch: Arch::POWERPC,
|
|
||||||
+ target_os: OS::Linux,
|
|
||||||
+ target_env: Some(Env::Musl),
|
|
||||||
+ tier: Tier::Three,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/// `powerpcle-unknown-linux-gnu`: PowerPCLE Linux
|
|
||||||
+pub const POWERPCLE_UNKNOWN_LINUX_GNU: Platform = Platform {
|
|
||||||
+ target_triple: "powerpcle-unknown-linux-gnu",
|
|
||||||
+ target_arch: Arch::POWERPC,
|
|
||||||
+ target_os: OS::Linux,
|
|
||||||
+ target_env: Some(Env::GNU),
|
|
||||||
+ tier: Tier::Three,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/// `powerpcle-unknown-linux-musl`: PowerPCLE Linux with MUSL
|
|
||||||
+pub const POWERPCLE_UNKNOWN_LINUX_MUSL: Platform = Platform {
|
|
||||||
+ target_triple: "powerpcle-unknown-linux-musl",
|
|
||||||
+ target_arch: Arch::POWERPC,
|
|
||||||
+ target_os: OS::Linux,
|
|
||||||
+ target_env: Some(Env::Musl),
|
|
||||||
+ tier: Tier::Three,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/// `powerpc64-unknown-linux-musl`: PPC64 Linux with MUSL
|
|
||||||
+pub const POWERPC64_UNKNOWN_LINUX_MUSL: Platform = Platform {
|
|
||||||
+ target_triple: "powerpc64-unknown-linux-musl",
|
|
||||||
+ target_arch: Arch::POWERPC64,
|
|
||||||
+ target_os: OS::Linux,
|
|
||||||
+ target_env: Some(Env::Musl),
|
|
||||||
+ tier: Tier::Three,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/// `powerpc64le-unknown-linux-musl`: PPC64LE Linux with MUSL
|
|
||||||
+pub const POWERPC64LE_UNKNOWN_LINUX_MUSL: Platform = Platform {
|
|
||||||
+ target_triple: "powerpc64le-unknown-linux-musl",
|
|
||||||
+ target_arch: Arch::POWERPC64,
|
|
||||||
+ target_os: OS::Linux,
|
|
||||||
+ target_env: Some(Env::Musl),
|
|
||||||
+ tier: Tier::Three,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/// `sparc64-unknown-netbsd`: NetBSD/sparc64
|
|
||||||
pub const SPARC64_UNKNOWN_NETBSD: Platform = Platform {
|
|
||||||
target_triple: "sparc64-unknown-netbsd",
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
42
srcpkgs/maturin/patches/target-lexicon-ppcle.patch
Normal file
42
srcpkgs/maturin/patches/target-lexicon-ppcle.patch
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
--- target-lexicon/src/targets.rs
|
||||||
|
+++ target-lexicon/src/targets.rs
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
Msp430,
|
||||||
|
Nvptx64,
|
||||||
|
Powerpc,
|
||||||
|
+ PowerpcLe,
|
||||||
|
Powerpc64,
|
||||||
|
Powerpc64le,
|
||||||
|
Riscv32(Riscv32Architecture),
|
||||||
|
@@ -517,6 +518,7 @@
|
||||||
|
| Mips64(Mips64Architecture::Mipsisa64r6el)
|
||||||
|
| Msp430
|
||||||
|
| Nvptx64
|
||||||
|
+ | PowerpcLe
|
||||||
|
| Powerpc64le
|
||||||
|
| Riscv32(_)
|
||||||
|
| Riscv64(_)
|
||||||
|
@@ -553,6 +555,7 @@
|
||||||
|
| Sparc
|
||||||
|
| Wasm32
|
||||||
|
| Mips32(_)
|
||||||
|
+ | PowerpcLe
|
||||||
|
| Powerpc => Ok(PointerWidth::U32),
|
||||||
|
AmdGcn
|
||||||
|
| Powerpc64le
|
||||||
|
@@ -737,6 +740,7 @@
|
||||||
|
Msp430 => f.write_str("msp430"),
|
||||||
|
Nvptx64 => f.write_str("nvptx64"),
|
||||||
|
Powerpc => f.write_str("powerpc"),
|
||||||
|
+ PowerpcLe => f.write_str("powerpcle"),
|
||||||
|
Powerpc64 => f.write_str("powerpc64"),
|
||||||
|
Powerpc64le => f.write_str("powerpc64le"),
|
||||||
|
Riscv32(riscv32) => riscv32.fmt(f),
|
||||||
|
@@ -913,6 +917,7 @@
|
||||||
|
"msp430" => Msp430,
|
||||||
|
"nvptx64" => Nvptx64,
|
||||||
|
"powerpc" => Powerpc,
|
||||||
|
+ "powerpcle" => PowerpcLe,
|
||||||
|
"powerpc64" => Powerpc64,
|
||||||
|
"powerpc64le" => Powerpc64le,
|
||||||
|
"s390x" => S390x,
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'maturin'
|
# Template file for 'maturin'
|
||||||
pkgname=maturin
|
pkgname=maturin
|
||||||
version=0.10.4
|
version=0.10.6
|
||||||
revision=1
|
revision=1
|
||||||
build_style=cargo
|
build_style=cargo
|
||||||
# Disable the 'rustls' feature, which leads to bad platform compatibility
|
# Disable the 'rustls' feature, which leads to bad platform compatibility
|
||||||
|
@ -13,16 +13,16 @@ short_desc="Build and publish crates as python packages"
|
||||||
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
||||||
license="Apache-2.0, MIT"
|
license="Apache-2.0, MIT"
|
||||||
homepage="https://github.com/PyO3/maturin"
|
homepage="https://github.com/PyO3/maturin"
|
||||||
# bump platforms version if it changes in Cargo.lock
|
# bump target-lexicon version if it changes in Cargo.lock
|
||||||
distfiles="${homepage}/archive/v${version}.tar.gz
|
distfiles="${homepage}/archive/v${version}.tar.gz
|
||||||
https://github.com/RustSec/platforms-crate/archive/v1.1.0.tar.gz"
|
https://github.com/bytecodealliance/target-lexicon/archive/v0.12.0.tar.gz"
|
||||||
checksum="8280456fc3958fe02f09aa20671a33922a5e1d57a8312901e03906cbe12630fd
|
checksum="e6a9a67cc62ffe248654e60e7ec211bf23319c4c936ad87022f7a1fd0997430d
|
||||||
2524984c2ef547bb54515828e4afad0e781a439d74cf0197cf168ec6c818594c"
|
18fead54e5dfa2cb0fa8af3db3c2765ca1c003b20cd4eca7be0553b30ce229de"
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
mv ../platforms-crate* platforms
|
mv ../target-lexicon* target-lexicon
|
||||||
echo "[patch.crates-io]" >> Cargo.toml
|
echo "[patch.crates-io]" >> Cargo.toml
|
||||||
echo "platforms = { path = './platforms' }" >> Cargo.toml
|
echo "target-lexicon = { path = './target-lexicon' }" >> Cargo.toml
|
||||||
}
|
}
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
|
|
Loading…
Reference in a new issue