maturin: update to 0.13.0.

This commit is contained in:
Andrew J. Hesford 2022-07-15 11:26:20 -04:00
parent a0885ac424
commit d8c3a95071
2 changed files with 41 additions and 33 deletions

View file

@ -25,7 +25,7 @@ diff -u a/setup.py b/setup.py
diff -u a/src/target.rs b/src/target.rs diff -u a/src/target.rs b/src/target.rs
--- a/src/target.rs --- a/src/target.rs
+++ b/src/target.rs +++ b/src/target.rs
@@ -53,6 +53,10 @@ @@ -55,6 +55,10 @@
Powerpc64Le, Powerpc64Le,
#[serde(alias = "ppc64")] #[serde(alias = "ppc64")]
Powerpc64, Powerpc64,
@ -36,7 +36,7 @@ diff -u a/src/target.rs b/src/target.rs
#[serde(alias = "i686")] #[serde(alias = "i686")]
X86, X86,
X86_64, X86_64,
@@ -67,6 +71,8 @@ @@ -70,6 +74,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"),
@ -45,7 +45,7 @@ diff -u a/src/target.rs b/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"),
@@ -83,6 +89,8 @@ @@ -87,6 +93,8 @@
Arch::Armv7L, Arch::Armv7L,
Arch::Powerpc64, Arch::Powerpc64,
Arch::Powerpc64Le, Arch::Powerpc64Le,
@ -54,16 +54,16 @@ diff -u a/src/target.rs b/src/target.rs
Arch::S390X, Arch::S390X,
Arch::X86, Arch::X86,
Arch::X86_64, Arch::X86_64,
@@ -162,6 +170,8 @@ @@ -167,6 +175,8 @@
target_lexicon::Architecture::Aarch64(_) => Arch::Aarch64, Architecture::Aarch64(_) => Arch::Aarch64,
target_lexicon::Architecture::Powerpc64 => Arch::Powerpc64, Architecture::Powerpc64 => Arch::Powerpc64,
target_lexicon::Architecture::Powerpc64le => Arch::Powerpc64Le, Architecture::Powerpc64le => Arch::Powerpc64Le,
+ target_lexicon::Architecture::PowerpcLe => Arch::PowerpcLe, + Architecture::Powerpc => Arch::Powerpc,
+ target_lexicon::Architecture::Powerpc => Arch::Powerpc, + Architecture::PowerpcLe => Arch::PowerpcLe,
target_lexicon::Architecture::S390x => Arch::S390X, Architecture::S390x => Arch::S390X,
Architecture::Wasm32 => Arch::Wasm32,
unsupported => bail!("The architecture {} is not supported", unsupported), unsupported => bail!("The architecture {} is not supported", unsupported),
}; @@ -353,6 +363,8 @@
@@ -321,6 +331,8 @@
Arch::Armv7L => "armv7l", Arch::Armv7L => "armv7l",
Arch::Powerpc64Le => "powerpc64le", Arch::Powerpc64Le => "powerpc64le",
Arch::Powerpc64 => "powerpc64", Arch::Powerpc64 => "powerpc64",
@ -72,7 +72,7 @@ diff -u a/src/target.rs b/src/target.rs
Arch::X86 => "i386", Arch::X86 => "i386",
Arch::X86_64 => "x86_64", Arch::X86_64 => "x86_64",
Arch::S390X => "s390x", Arch::S390X => "s390x",
@@ -345,7 +357,7 @@ @@ -379,7 +391,7 @@
/// Returns the oldest possible Manylinux tag for this architecture /// Returns the oldest possible Manylinux tag for this architecture
pub fn get_minimum_manylinux_tag(&self) -> PlatformTag { pub fn get_minimum_manylinux_tag(&self) -> PlatformTag {
match self.arch { match self.arch {
@ -81,12 +81,12 @@ diff -u a/src/target.rs b/src/target.rs
PlatformTag::manylinux2014() PlatformTag::manylinux2014()
} }
Arch::X86 | Arch::X86_64 => PlatformTag::manylinux2010(), Arch::X86 | Arch::X86_64 => PlatformTag::manylinux2010(),
@@ -357,7 +369,7 @@ @@ -391,7 +403,7 @@
pub fn pointer_width(&self) -> usize { pub fn pointer_width(&self) -> usize {
match self.arch { match self.arch {
Arch::Aarch64 | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::X86_64 | Arch::S390X => 64, Arch::Aarch64 | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::X86_64 | Arch::S390X => 64,
- Arch::Armv6L | Arch::Armv7L | Arch::X86 => 32, - Arch::Armv6L | Arch::Armv7L | Arch::X86 | Arch::Wasm32 => 32,
+ Arch::Armv6L | Arch::Armv7L | Arch::X86 | Arch::PowerpcLe | Arch::Powerpc => 32, + Arch::Armv6L | Arch::Armv7L | Arch::X86 | Arch::PowerpcLe | Arch::Powerpc | Arch::Wasm32 => 32,
} }
} }

View file

@ -1,13 +1,10 @@
# Template file for 'maturin' # Template file for 'maturin'
pkgname=maturin pkgname=maturin
version=0.12.20 version=0.13.0
revision=1 revision=1
build_style=cargo build_style=python3-module
build_helper=qemu build_helper="qemu rust"
# Disable the 'rustls' feature, which leads to bad platform compatibility hostmakedepends="python3-setuptools-rust python3-tomli python3-wheel cargo"
# The list of enabled features should be reconciled with each new release
configure_args="--no-default-features --features log,upload,human-panic"
hostmakedepends="python3-setuptools-rust python3-tomli"
makedepends="openssl-devel" makedepends="openssl-devel"
depends="python3-tomli" depends="python3-tomli"
short_desc="Build and publish crates as python packages" short_desc="Build and publish crates as python packages"
@ -17,32 +14,43 @@ homepage="https://github.com/PyO3/maturin"
# bump target-lexicon 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/bytecodealliance/target-lexicon/archive/v0.12.4.tar.gz>target-lexicon-${version}.tar.gz" https://github.com/bytecodealliance/target-lexicon/archive/v0.12.4.tar.gz>target-lexicon-${version}.tar.gz"
checksum="5a1c9ed2acd8ea1edbe7e8b7ed78f2f6887eff77f696dbdd93f81b606960efbe checksum="b44a22c65ccb00f25c53540889ee0358f79a40673adee38e8c75411deef60576
f801dbb02555852e90d56d5a71e73ee42678c1bc583bb62a2970d4158f6ab6de" f801dbb02555852e90d56d5a71e73ee42678c1bc583bb62a2970d4158f6ab6de"
# Tests use unstable features and fail to build # Tests use unstable features and fail to build
make_check=no make_check=no
if [ "$CROSS_BUILD" ]; then
makedepends+=" rust-std"
fi
post_extract() { post_extract() {
mv ../target-lexicon* target-lexicon mv ../target-lexicon* target-lexicon
echo "[patch.crates-io]" >> Cargo.toml echo "[patch.crates-io]" >> Cargo.toml
echo "target-lexicon = { path = './target-lexicon' }" >> Cargo.toml echo "target-lexicon = { path = './target-lexicon' }" >> Cargo.toml
} }
post_build() { post_patch() {
# python package is pure; the cross environment is not relevant # Disable the 'rustls' feature, which leads to bad platform compatibility
python3 setup.py build vsed -i -e '/^default =/s/"rustls", //' Cargo.toml
# Generate some completions
_matbin="target/${RUST_TARGET}/release/maturin"
vtargetrun "${_matbin}" completions zsh > maturin.zsh
vtargetrun "${_matbin}" completions fish > maturin.fish
vtargetrun "${_matbin}" completions bash > maturin.bash
} }
post_install() { post_install() {
vlicense license-mit LICENSE-MIT vlicense license-mit LICENSE-MIT
python3 setup.py install --prefix=/usr --root=${DESTDIR} python3 setup.py install --prefix=/usr --root=${DESTDIR}
# Wheel installers would move the data components into the main
# hierarchy automatically, but that doesn't happen here; do it manually.
# See https://peps.python.org/pep-0491/#the-data-directory
local _pydata="${DESTDIR}/${py3_sitelib}/maturin-${version}.data"
vmkdir usr/bin
mv "${_pydata}/scripts/maturin" "${DESTDIR}/usr/bin"
# Generate and install some completions
local _matbin="${DESTDIR}/usr/bin/maturin"
vtargetrun "${_matbin}" completions zsh > maturin.zsh
vtargetrun "${_matbin}" completions fish > maturin.fish
vtargetrun "${_matbin}" completions bash > maturin.bash
vcompletion maturin.zsh zsh vcompletion maturin.zsh zsh
vcompletion maturin.fish fish vcompletion maturin.fish fish
vcompletion maturin.bash bash vcompletion maturin.bash bash