summaryrefslogtreecommitdiff
path: root/dev-util/maturin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-06 00:10:59 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-06 00:10:59 +0000
commit22eaa60297c2dbc92dd1658fb7d8e46878552755 (patch)
treec3e1147cecf778a6418d736658cedc5d7f2dfa2d /dev-util/maturin
parente019d91362a4788fe5cc5788877327b813d0f730 (diff)
gentoo auto-resync : 06:02:2025 - 00:10:59
Diffstat (limited to 'dev-util/maturin')
-rw-r--r--dev-util/maturin/Manifest3
-rw-r--r--dev-util/maturin/maturin-1.8.2.ebuild160
2 files changed, 163 insertions, 0 deletions
diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest
index cc3fdd32ee7f..8b750d28b86d 100644
--- a/dev-util/maturin/Manifest
+++ b/dev-util/maturin/Manifest
@@ -191,6 +191,8 @@ DIST maturin-1.7.4.gh.tar.gz 511488 BLAKE2B 008b2d67d553479040fcd3062b93ca12dc6f
DIST maturin-1.7.8.gh.tar.gz 526856 BLAKE2B 0fcd40dbf20cd961aa97e936b58ea79aceddfe6175ba4c1d1b413c224c889f393719dffe583859c35894173801cbd5303093802c5a4986038eb00a1f4ff3f3d4 SHA512 11dd229bc0a240fe915ae4aa69d5dd10032ea41782cb2bf76e77e58a8d474543b133a78d6b24a0383ef281f83122f34e1e0c332227720643b63226c18e318445
DIST maturin-1.8.1-vendor.tar.xz 28014132 BLAKE2B 0fdaa5c2005645a964594431ea29faeed2aa703f8e33776fe1c02f865a36a11793e8aad5c18f295e97085e7c1e2fb26ada8968703920455c78327b23a9338182 SHA512 3bf23cf509ba416002d8a7b2a0cd2e6b2b6ec98ab335fcdade501a99b068cbf6db5a3665ca918b1192839cc0377ede0d150a657a104a98cc85e90a83d030d174
DIST maturin-1.8.1.gh.tar.gz 542041 BLAKE2B 0ded1146c03d1139cc826bff520dbed4f27f4c0d2fa58a1336b075d222bb73881ec455d9b8480206c9f25756d6680a3918db4b4043fb6a63a023d94d23c5ea48 SHA512 2f07ced149fd59035c3acddbc4449cdfa59f8680d1784a68fbb71414a8a6309d3e138b10a7aeb3ca1f35f52ffe04c0e557e4636c84b7d8c60cd012798e3ec041
+DIST maturin-1.8.2-vendor.tar.xz 17297348 BLAKE2B 400ae0e41d3c3a7e330482902fe73c1def631bbdb32734e6fa110eb6d2d954b464d9feeca5727d8f551d30cb6868c3000afcaed452c3f10a661e6f03d79edd02 SHA512 c5faa7ff3c49e5097a27f19821bf4a355dd17ed74efae503ec1639cb8a695873cdc5a89a94da77fe7cb7cb1e1685ab895c801bbf94828c22d7c0ba29105213fa
+DIST maturin-1.8.2.gh.tar.gz 544160 BLAKE2B d5784b76ee7dbbb48818e3ef0acebe32cee423e787f9c4bdcc50af90656a34d1dd1a89c414948b07e983edc1047382b82a1590d4c0de0e59279be81e06bbbdfc SHA512 83ca2dc64e1933f18b66d06bb985f6834a41ae289cf74d01689158febda783157cbecfb5c10c6da9544eda501acb9fdc52dd9cd7f351c2c4c5c0c0a1e6cffc4f
DIST memchr-2.7.2.crate 96220 BLAKE2B 2399064b6db21838d4aa0b25ed0bf04940ee3820741658cc6bf62e5ade08f41320df743ff13f99b2781da7b844e18deb1cfe25fe570f0e93f98ff03ca5d442e3 SHA512 cadcb4239c7f3aaab042592c5186770a225621e32f8583052fd3dbebb4a6d9b99be28f589b39b5ca36cb2d56fb3709e7d4ba91838ebb882e28e51280c02bbc40
DIST memchr-2.7.4.crate 96670 BLAKE2B da38114beca670467c3e1fbf4e415af6f22d52e3223715d52e181babb89b872b46511563985bcc16d7ff4e82f812c6e83ad904b0fe2501b14445119dfa8240e6 SHA512 8d0e8b9c30208897d4b1b920f1bdcccd0c2b75d92a06abe4a1b2407938768abb6487d63de56c6a80419798fe69517210643dfaf11f5f5540185f0eccf220adb2
DIST memoffset-0.9.0.crate 9033 BLAKE2B 19090c1af8b8cf54a2cf7593748aff4d3dc685ec7080aa476139c1721ef71555495e1bc513b1efaddc7e7702f83e0e1c2a8f71ff40009d266539484c9297e0ed SHA512 2f04f9b6fed31e94388c18162ad275897a835df7b9ac827f4df0f4b0ecf71064ef247f7ad11dbc27d7a6d448984a0f29d1c000e3c8d5fa6e121fa9571770ec55
@@ -488,4 +490,5 @@ DIST zopfli-0.8.1.crate 50972 BLAKE2B 27cde48858dc65ec8082d4e0d81e2758f92d3dcc7a
EBUILD maturin-1.7.4-r1.ebuild 12458 BLAKE2B 594759cd0026cc4e25b491729ef4b2b043f9ed8427bcee3ac308026319bac3537311a22168920d484a4b76314b94b61f14589c42dea0b9f86ca936efb90156c0 SHA512 32a83cde5975e60e1b873e73358936252e4f6b878553a2ececad5bb594ff49ceafb65f186f133238b78bf2fb812dfef11810550214275593a7f9c432c9e6090b
EBUILD maturin-1.7.8.ebuild 12849 BLAKE2B 4f0427f2bf635264bb4bb682ba12d6d4e0e36ef0760dc210c88506d7ffb423ef9609fd2c5940479859300fcadc6bf616a7514f10aabad637544fbe536bc2412d SHA512 7bdeac94d354f1ba390eec81137f04f816e683a16b17ad22a8b2d14d20f9aef5949fc6da458c07baf93220600cc0b6328cbaa91e1f8e8213b53356e1f5ab0a07
EBUILD maturin-1.8.1.ebuild 4609 BLAKE2B e2177e3709a92c661a2c90c273b047ad60d1abe90f548e98cc1fdc96b2c0a4731a2c717ae36898597c63b8eddb6cd9d69877bdd32d4ca6a257c59a188d8746d3 SHA512 82ef0cee43f5cb56db57cc9bf64b3dcc61c578791758173b319f202b90b3625976f5a9d0ade8528de9dde08f11ffde5d13ab7bf3610598542bb9eab7d7fc4775
+EBUILD maturin-1.8.2.ebuild 4607 BLAKE2B f44dfaa91f3b265df82c0d18f2e80f62ce09f95a6baf6d0c2c70905acfa1c4144982e5f2ee8eeb52229ec851676aadb929e6eaaaf858294841c214d6eb1d68b0 SHA512 0a9dcc5c12632e4994e638efb5649e0e68679205917566b901a740d2e2e2fbbcff947aa232bb84ee987807c8c0a3c4ea14632ece3396aeca3544a5a589dac343
MISC metadata.xml 431 BLAKE2B 15731479f56d8b819c60e8e5541d3c4720462c5a90b199b803097b208432b18cc0143f8cbee471ce81ffeb8b54846fdb61fad083e7507f4f6c3630ac628546ed SHA512 7431db948fd5ab520fb6cae76c7e7dbb2c7aef907d7cde21189d1bb17c686cca7f69a0b84470b1c5d90f672e80d30fbb56f37beec1da04ebfdf025015c099ae7
diff --git a/dev-util/maturin/maturin-1.8.2.ebuild b/dev-util/maturin/maturin-1.8.2.ebuild
new file mode 100644
index 000000000000..0a39c135c2ff
--- /dev/null
+++ b/dev-util/maturin/maturin-1.8.2.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+RUST_MIN_VER=1.75.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
+
+# rustls+ring is unused, so openssl license can be skipped
+LICENSE="|| ( Apache-2.0 MIT ) doc? ( CC-BY-4.0 OFL-1.1 )"
+LICENSE+="
+ 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 MIT
+ MPL-2.0 Unicode-3.0 Unicode-DFS-2016
+" # crates
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc +ssl test"
+RESTRICT="!test? ( test )"
+
+TOMLI_DEPEND="$(python_gen_cond_dep 'dev-python/tomli[${PYTHON_USEDEP}]' 3.10)"
+DEPEND="
+ app-arch/xz-utils
+ ssl? ( dev-libs/openssl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ ${TOMLI_DEPEND}
+"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-text/mdbook )
+ test? (
+ ${TOMLI_DEPEND}
+ $(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
+
+ # used by *git_sdist_generator tests
+ git init -q || die
+ git config --global user.email "larry@gentoo.org" || 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
+
+ # bug #938847 (TODO?: should probably be an eclass default for musl)
+ use elibc_musl && RUSTFLAGS+=" -C target-feature=-crt-static"
+
+ # 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 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
+ # fails on sparc since rust-1.74 (bug #934573), skip for now given
+ # should not affect the pep517 backend which is all we need on sparc
+ $(usev sparc '--skip build_context::test::test_macosx_deployment_target')
+ )
+
+ cargo_src_test -- "${skip[@]}"
+}
+
+python_install_all() {
+ cargo_src_install
+
+ dodoc Changelog.md README.md
+ use doc && dodoc -r guide/html
+
+ if ! tc-is-cross-compiler; then
+ dobashcomp "${T}"/${PN}
+ dofishcomp "${T}"/${PN}.fish
+ dozshcomp "${T}"/_${PN}
+ fi
+}