commit:     33c3d5455d37bc5df1a08e163fed50539a2dad01
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 16 15:45:09 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Feb 16 15:56:26 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33c3d545

dev-util/maturin: add 1.12.2

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

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

diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index 6a61c5984e1d..097337c81dc5 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -4,3 +4,5 @@ DIST maturin-1.12.0-vendor.tar.xz 19134060 BLAKE2B 
94b00c1dd663f33e0b8a5d9f68926
 DIST maturin-1.12.0.gh.tar.gz 627384 BLAKE2B 
0bad2fb856ef80d40b92ed572068b7a11104670d06e10d63d6539317baf966462dda89bd2fb1710b87c741e291ba711423d826c9e86039138fd0054667a1795b
 SHA512 
0e2a16441ab185a01b2e7b0a8d23346d5d7eb45e73f4280da6085362b926cc324b6f8b5ad33b323f47f935019f84c2de09ce880f1c699532ffc14076c5164f9d
 DIST maturin-1.12.1-vendor.tar.xz 19253720 BLAKE2B 
9e4b7c4e70918980c6954e44b17e4902c881d1764828037113b7b5d5a9ecc6b1b7be09d627d1bf66978194d4ab4b57ea25bad9a72a014f006b875ad323f2bd7c
 SHA512 
4e6f35b5362748d0f969547f92627844bb1f8a79daf4a781b7ac892e9eed305fcaec50844a4d6dc74be35807a8163babff6f3b61cad95b8542c4b91ec7e66727
 DIST maturin-1.12.1.gh.tar.gz 638521 BLAKE2B 
13c66b8ca9342dc9593e8b66bcf7c303d7b741f168fd09b06cb2baef0a6619c9aa4a5a6ba3bdbe7d1275f1def64f1bee42ee16d81aeed6b09859b83dc117ab3f
 SHA512 
a6177de266efa79d50bf75278ee6ea44459b4fff8c096b5b5de72ca9c1032eb59a5c1e726a4c632149e1ed7d0b7139e5420519eaaabc4a9558163b5fb18003b8
+DIST maturin-1.12.2-vendor.tar.xz 19225420 BLAKE2B 
1d174dcc957736c02b26a436287a11ff2fb512db87d5d082540781d0e75b7a31ac40b152859b70616f735c4ac850b05541b34413aaf7795acb8ab342d0d72695
 SHA512 
4f17924cff5c5e7a6ad5cdcfa59f1eff38579a6374dc09591a42081d0f82b64d71ffe19c6f94e9350ee7adce0768e8db0ccd77c629d8e1d550da86879966f7b6
+DIST maturin-1.12.2.gh.tar.gz 638646 BLAKE2B 
97c4717fb18b2c88c8444c18de2b36891212419535f31f314935d2f24c321f07e2775f6b5a5ecaec7e69626dabd4e3d3261a7a0c5bb359521d5b1c75ca582c00
 SHA512 
0d2cd6e23e03a3e8aeca4e11f56349cdf82055769ef7460d22e8a2bbb05112da666cf3d2bfe76dcab151ede1c947bd24a476c6ae6f1eedd44e30aae818af3f54

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