commit:     a75cc90e81de031cb03899c08f7cfd2bf9e14630
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 21 11:28:15 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Feb 21 11:47:59 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a75cc90e

dev-util/maturin: add 1.12.4

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/maturin/Manifest              |   2 +
 dev-util/maturin/maturin-1.12.4.ebuild | 157 +++++++++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)

diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index 4bd423e49588..5288efbffbba 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -2,3 +2,5 @@ DIST maturin-1.11.5-vendor.tar.xz 16507616 BLAKE2B 
83b6607c91a0925ad52bbdb888eef
 DIST maturin-1.11.5.gh.tar.gz 596610 BLAKE2B 
f78673c59d13211771d37b74468041255cb8f7fa2113851e3fda2da8811e34c1a6e5c0eeb5d61430653342b97f899fff24984446e533759d3db06458afab2eda
 SHA512 
49e7976be5790f524d5a423519c4ee73ccb450f0e84fea5ba691421cd8e303cb4166324d42985b1ae321a71c4295f244632da194a5be7cacbe7951cdbc0dbb92
 DIST maturin-1.12.3-vendor.tar.xz 19238920 BLAKE2B 
a8e1595ee6a8a843f050308e639989544cb1f63e3587da313e4ed3452f2483ecf1302c569b557732eb990050979fe8b8943010316aff30aa837406b6b1d1f3cb
 SHA512 
9035b935c77583053b79a580a66e0a8eaee5ee63d137b4598e911f4d5b5529dc8eefb2a5201715c7db034f9dbaff8b28c39e5c092770bf9c0d083524fd7130f8
 DIST maturin-1.12.3.gh.tar.gz 641410 BLAKE2B 
34266c48f8751306b69791739316f7abdebee27a904ab428e14e8739d958f504993b111eff770cd277dd7f63847e0237e524368dcbedec0630e7172104774d0d
 SHA512 
281e42f73e51c7851752ee1c807632fbabf14d794fd867cd38287531bff0ab1f0c5dd167638064aab44fa677c9d4eb4e3b71bd2ee034b7d97ddafa84b79e3dae
+DIST maturin-1.12.4-vendor.tar.xz 19246564 BLAKE2B 
e641b0d3c1fc4ef84c2f75fed654fb719230c8d9abaac303b0c3b07fdffd3323fe8188d5af5f75f58b17f700a8fcf770975c67e1c65ae727a099911069b50f2c
 SHA512 
5c0131ed31381622a90ae5bf4f6be12a54414ec89fc150affc00a0f9be9900687602c8c70a2c3dddfb2fa9df7135e44ec9bb392883cdb06c715be66e9ac9fe42
+DIST maturin-1.12.4.gh.tar.gz 643715 BLAKE2B 
5021b14670738f6e295cc7e5f855488fde0829587aee9809a386ea83bfccf786c7e5c07fa8a3cecda3933c23dc2a18758d695714652345f9436a1d02d761c62a
 SHA512 
bf4b7076f49cf02cd4fc3b463ce88e614c91085c7d02e450a90d3980222148c56afef0ea8c4dcd810075fe2fde4ea25e2cda6dae9d4b886a0c9aa36fe87e07a9

diff --git a/dev-util/maturin/maturin-1.12.4.ebuild 
b/dev-util/maturin/maturin-1.12.4.ebuild
new file mode 100644
index 000000000000..8641c58221a6
--- /dev/null
+++ b/dev-util/maturin/maturin-1.12.4.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_UPSTREAM_PEP517=standalone
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+RUST_MIN_VER=1.88.0
+inherit cargo distutils-r1 flag-o-matic shell-completion toolchain-funcs
+
+DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi 
bindings"
+HOMEPAGE="https://www.maturin.rs/";
+SRC_URI="
+       https://github.com/PyO3/maturin/archive/refs/tags/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz
+       https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.tar.xz
+"
+# ^ tarball also includes test-crates' Cargo.lock(s) crates for tests
+
+LICENSE="|| ( Apache-2.0 MIT ) doc? ( OFL-1.1 )"
+LICENSE+="
+       0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD
+       CDLA-Permissive-2.0 MIT MPL-2.0 Unicode-3.0 ZLIB BZIP2
+" # crates
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc +ssl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       app-arch/xz-utils
+       app-arch/zstd:=
+       ssl? ( dev-libs/openssl:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+       doc? ( >=app-text/mdbook-0.5 )
+       test? (
+               $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 
'python*')
+               dev-python/boltons[${PYTHON_USEDEP}]
+               dev-python/virtualenv[${PYTHON_USEDEP}]
+               dev-vcs/git
+               elibc_musl? ( dev-util/patchelf )
+       )
+"
+
+QA_FLAGS_IGNORED="usr/bin/${PN}"
+
+src_prepare() {
+       distutils-r1_src_prepare
+
+       # we build the Rust executable (just once) via cargo_src_compile
+       sed -i -e '/setuptools_rust/d' -e '/rust_extensions/d' setup.py || die
+
+       if use test; then
+               # used to prevent use of network during tests, and silence pip
+               # if it finds unrelated issues with system packages (bug 
#913613)
+               cat > "${T}"/pip.conf <<-EOF || die
+                       [global]
+                       quiet = 2
+
+                       [install]
+                       no-index = yes
+                       no-dependencies = yes
+               EOF
+
+               # uv does not work easily w/ network-sandbox, force virtualenv
+               sed -i 's/"uv"/"uv-not-found"/' tests/common/mod.rs || die
+
+               # increase timeouts for tests (bug #950332)
+               sed -i '/^#\[timeout/s/secs(60)/secs(300)/' tests/run.rs || die
+
+               # used by *git_sdist_generator tests
+               git init -q || die
+               git config --global user.email "[email protected]" || die
+               git config --global user.name "Larry the Cow" || die
+               git add . || die
+               git commit -qm init || die
+       fi
+}
+
+src_configure() {
+       export OPENSSL_NO_VENDOR=1
+       export ZSTD_SYS_USE_PKG_CONFIG=1
+
+       # https://github.com/rust-lang/stacker/issues/79
+       use s390 && ! is-flagq '-march=*' &&
+               append-cflags $(test-flags-CC -march=z10)
+
+       local myfeatures=(
+               # like release.yml + native-tls for better platform support 
than rustls
+               full
+               password-storage
+               $(usev ssl native-tls)
+       )
+
+       cargo_src_configure --no-default-features
+}
+
+python_compile_all() {
+       cargo_src_compile
+
+       use !doc || mdbook build -d "${T}"/html guide || die
+
+       if ! tc-is-cross-compiler; then
+               local maturin=$(cargo_target_dir)/maturin
+               "${maturin}" completions bash > "${T}"/${PN} || die
+               "${maturin}" completions fish > "${T}"/${PN}.fish || die
+               "${maturin}" completions zsh > "${T}"/_${PN} || die
+       else
+               ewarn "shell completion files were skipped due to 
cross-compilation"
+       fi
+}
+
+python_test() {
+       local -x MATURIN_TEST_PYTHON=${EPYTHON}
+       local -x PIP_CONFIG_FILE=${T}/pip.conf
+       local -x VIRTUALENV_SYSTEM_SITE_PACKAGES=1
+
+       # need this for (new) python versions not yet recognized by pyo3
+       local -x PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
+
+       local skip=(
+               # picky cli output test that easily benignly fail (bug #937992)
+               --skip cli_tests
+               # avoid need for wasm over a single hello world test
+               --skip integration_wasm_hello_world
+               # fragile depending on rust version, also wants libpypy*-c.so 
for pypy
+               --skip pyo3_no_extension_module
+               # unimportant tests that require uv, and not obvious to get it
+               # to work with network-sandbox (not worth the trouble)
+               --skip develop_hello_world::case_2
+               --skip develop_pyo3_ffi_pure::case_2
+               # compliance test using zig requires an old libc to pass (bug 
#946967)
+               --skip integration_pyo3_mixed_py_subdir
+               # these currently attempt to install tomli regardless of python 
version
+               --skip pep517_default_profile
+               --skip pep517_editable_profile
+       )
+
+       cargo_src_test -- "${skip[@]}"
+}
+
+python_install_all() {
+       dobin "$(cargo_target_dir)"/maturin
+
+       dodoc Changelog.md README.md
+       use doc && dodoc -r "${T}"/html
+
+       if ! tc-is-cross-compiler; then
+               dobashcomp "${T}"/${PN}
+               dofishcomp "${T}"/${PN}.fish
+               dozshcomp "${T}"/_${PN}
+       fi
+}

Reply via email to