commit:     d4ea7bac8bf2c47e6e02d2a7309affa02625539e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  1 15:16:19 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Mar  1 15:40:54 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4ea7bac

dev-util/maturin: add 1.12.6

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

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

diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index 69e2cc9726b8..949619858d78 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -6,3 +6,5 @@ DIST maturin-1.12.4-vendor.tar.xz 19246564 BLAKE2B 
e641b0d3c1fc4ef84c2f75fed654f
 DIST maturin-1.12.4.gh.tar.gz 643715 BLAKE2B 
5021b14670738f6e295cc7e5f855488fde0829587aee9809a386ea83bfccf786c7e5c07fa8a3cecda3933c23dc2a18758d695714652345f9436a1d02d761c62a
 SHA512 
bf4b7076f49cf02cd4fc3b463ce88e614c91085c7d02e450a90d3980222148c56afef0ea8c4dcd810075fe2fde4ea25e2cda6dae9d4b886a0c9aa36fe87e07a9
 DIST maturin-1.12.5-vendor.tar.xz 19322640 BLAKE2B 
e8c537c78ed6cf6a590185d3b5b152fa1761098bfd05c0d68c579d2e0ff4dada3b680c564a26750ff7ff0e4d6870d9922828d59a05d61bb933d02077e0acf65a
 SHA512 
5cba7f88f4a8716441c11ae27f59b3f8dc7debffe5c0f8d41b3dea4944f3d293da3361cea037ea762c4f63e933c8afe502d90f2ba1d19ca9006ff3a4d131cd8b
 DIST maturin-1.12.5.gh.tar.gz 648930 BLAKE2B 
46f32b6dd0bc8af554841aac26800449737fdb7556df6497bfb7694e8444cabd6c43bc0ead9cb9ebec1d365333136c4e79853ee8606fad1556b3ae0fb27e01b5
 SHA512 
1f0ea04bdf568839cba8aa3f521e3dc3ff6ffc3b0212731ae6ce2b551992dcf1ee798ba2ac2064bc36d9fbcc4b8541b6ccf588a9e8834955a9976e507711dc07
+DIST maturin-1.12.6-vendor.tar.xz 19339996 BLAKE2B 
5fa56bde7c2445eebd51802e58ae53cc9fa7742d04d0b79043f29bdedee8b3e0871042ca1481b310398c3ffd51b518f97bf74c13999c7bc0b83dd2b9e5e4799d
 SHA512 
c32f476784de0d86e4d3ec47a92f9e7d17f5e257b81b7aef8914e76d03d822f8117bb45ea055cb6e391ca1dfa9b6ae211e1eab117cda9559316eff8a1111d2e3
+DIST maturin-1.12.6.gh.tar.gz 650246 BLAKE2B 
ea808aac177168947c059506ae19c53d322811fc8c0c20c01cf8a40364344daca0a3ffba09032352b0faea2f3f88286509d5fc4434658f30fbe6971aaa6d657f
 SHA512 
49d4e6d759be491f7c689c37738586f0059ec4c0067ed9862858b124aad904504e7af44d2b58c1aa123b268a536ab2bdecef53564c8a0e649e37678fdf0170be

diff --git a/dev-util/maturin/maturin-1.12.6.ebuild 
b/dev-util/maturin/maturin-1.12.6.ebuild
new file mode 100644
index 000000000000..8641c58221a6
--- /dev/null
+++ b/dev-util/maturin/maturin-1.12.6.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