diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-05-07 03:57:16 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-05-07 04:46:27 -0400 |
commit | b703b16e7a55dff3af4d7abd2775df7eb15b3b37 (patch) | |
tree | c89250673fc08c9e11e1dbac111e12cb60c7e81f /dev-util | |
parent | media-gfx/freecad: Stabilize 0.20.2-r1 amd64, #905616 (diff) | |
download | gentoo-b703b16e7a55dff3af4d7abd2775df7eb15b3b37.tar.gz gentoo-b703b16e7a55dff3af4d7abd2775df7eb15b3b37.tar.bz2 gentoo-b703b16e7a55dff3af4d7abd2775df7eb15b3b37.zip |
dev-util/maturin: add 0.15.0
Almost identical to 1.0.0_beta9, but released as 0.15.0 for wider
testing before 1.0.0. Assuming not overlooking anything, means can
use the 1.0.0_beta9 ebuild as-is for this (minus 3 newer crates).
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/maturin/Manifest | 3 | ||||
-rw-r--r-- | dev-util/maturin/maturin-0.15.0.ebuild | 477 |
2 files changed, 480 insertions, 0 deletions
diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest index ab9af41f9d5a..c00642232869 100644 --- a/dev-util/maturin/Manifest +++ b/dev-util/maturin/Manifest @@ -187,6 +187,7 @@ DIST lzxd-0.1.4.crate 21891 BLAKE2B 8271b79bdf6c65a17b5fe77a4d8b7d3a96ccf1752d21 DIST mailparse-0.13.8.crate 36008 BLAKE2B 8112658b4ceb5b3528375f4f8a178a26c18b5494ba582c333e09de6263769869b5a4903ec2d62cab7a032635fa5d28f00f3f80337b968221e386e252f842cf36 SHA512 c7557f741c170c421d5ccef8cb771fce544b3f3da0475b170f82116c00cdd7522fe29fc8bb4dfa20735345b2c72e12af0bcc4317d9ada412b59f9ff4266e14ac DIST matchers-0.1.0.crate 6948 BLAKE2B ec3a5d01d2fedbb4dbf5bb185afbb9401410463a61f51674e0df6a571db352b2bbabfb99cdbdcfb4e511ae783165bf0258f5163f240a229b9087f9edbd0df41a SHA512 84214c1a84952d85631aa1ab5115df7cda223ac64e2acf055b6129ba1aa26ddc87615a8b51ca890ce3fee0419053fa7fe1599ae128f1d211b58c07b0c4af3b19 DIST maturin-0.14.17.gh.tar.gz 392461 BLAKE2B 4d0d2d5101a05017883b27dca270c3f3b84c77dd53f19db04c2b5a988b699f3b39b6b7a88c7ac02b5e322679f5509bdf68b5c5f27ec229816c394ebc5fb57fd8 SHA512 d12503530b0d865b6b3c40e564742d0e798107102fb7167c137c1b0a4fa63bfad739320901cff15a680a09034aae553c3cd55cf0c8f1d3ed0fd96404bb93cbfe +DIST maturin-0.15.0.gh.tar.gz 425158 BLAKE2B 43b23a97e078f67b3352ac888d09ae5737072ab26c7fbfdbdcbeb60afb1b52f275b9e29f88053c32ec87f0242ea27e62e72818861e6befb93117ef41c9584af8 SHA512 31d6d3165a9d201b847713b562bda82ee9d25da9195e5a32db3d6a1ded09d5597d929b1fb3c3bcbbef90bcd0eee78ef42358db7f1c7969924e67fd0d4745a2f7 DIST maturin-1.0.0_beta9.gh.tar.gz 425158 BLAKE2B ae0a3cd2ded33fba868c1343b9cb0c7607f8d54eb741a1292d0a889bc820901d1a6a9dbffe8b2ab502908be53bd0bde34c3a3a3133ecf758949468f219910d6f SHA512 299b6da49a9e6f879e761ffac63c769bb3ca944331c6a49a36e2e610165ef4b25eee5673cc53ab4437aa0ad22e5a3b23848a1cf97f98819b1f295bfcd4b7a866 DIST memchr-2.5.0.crate 65812 BLAKE2B 57966413a1f933dcb2d2d4ccb29c247070f65a83299b2a9f5aa83f5a48a5c5f1c4c7c632fa63bd19f9508e9291e7258db2f16e2813a56fd84e0856f70f1e67ab SHA512 444a163b484c233e78c0e2e4d51f01ce2da93d7d29f516a95e4b0866b20bdfd3f34137653abed53eb70387991ee3e2b5937d8d4360a85bbcb50a93005a75defa DIST memoffset-0.6.5.crate 7686 BLAKE2B 9a797388702389076c426052c3d54dc62802d5db8bc5c9c83990429f2ffaec4fab4c7dd3f09cd0704d1ea555e87976563bb43408ba54b5e66ce7e406d4604009 SHA512 11bdd9185b99dfee8e659e051b09ee301c7142a372a8117864745a5085c015436d2efbb1478192886f09cbc562529e209d2e3325d94938a64bc75b1d91d2bf3f @@ -380,10 +381,12 @@ DIST thiserror-impl-1.0.39.crate 15057 BLAKE2B 72679c216f5c6dfeac1c13c22a5a019c2 DIST thread_local-1.1.4.crate 13106 BLAKE2B 64c19368f8cec46f23b3052759c4c4ef0de50748432790e6ea11b12477239b177d54e60b9046fdcb2f495b8e0b37ad82809d03602edab9fc85cf814e3bd94fe2 SHA512 db7ff3eb88a73d9313dd58d72397614c5aae6be1d64ead7f16535cae2857be3b27d189e7955308591ec64a0d67777fd2a62a2b124ca73facb9a2d8e0458bdbb5 DIST thread_local-1.1.7.crate 13585 BLAKE2B f497dbcdfaf7dbc8b4b0dd97f77ba93df15b63303e7894c9032c9822a5b8111e0a21db2fa8cfdce5a503f70959ac9cdf48c840b925bdd850dc15e8436ba72379 SHA512 3772452c2a349fb564d29bb06e13c8ae64807db27c3ee217fa04fd0e9847e94adeea582b82ffc2d9116f31ff478eb088550caf1346c263de49b55fa17b431c31 DIST time-0.3.17.crate 99048 BLAKE2B a10a4b8d0edf8ca5f073f0840060a487a60a162341be3454e069eae48fd43b9b7bcfdb9bfd7d31380d8beb1c5364bfc9b774f3f438327d49f04eb452d2932e9a SHA512 c69ec373a79038315d0257203be16539f5efcfc0ceb9ce2cc0413f3d6ab6ff39881720c310f12cada17536ccecc4501f081890290d15282514b26fafc02abe69 +DIST time-0.3.20.crate 111856 BLAKE2B d4fd3d3f9fb164b26317fa26788014419902147c7f17816a09565590245acf72019fb57e88d4f4ad4a399c5dc92247af9e915fc5d2168710f81673ed609a055d SHA512 689099bcd5cfea6b92d88584d92e7c15163f427f621c653026e3b3f8066a3932836de3f8be9716a41b77f1d36a9fa6c3e2a42ab011d21ca38efeb55522a39145 DIST time-0.3.21.crate 111598 BLAKE2B 8b760bf4bb8501ae3b4c121e1265b9f07fea633e8acfcc091e8c2a4ebf1f2025c87f13d63c95ee46eb3fe31f920605c2100349c8b7be0242ff8c74037fc7c602 SHA512 1bc0505fd823d7ab869e2b8b1e44563dbf2bcb7cb4a9fc67d32efb54872177e89b7dc051151d4d83d21d77d4c3d89a3370d35e4fd5db9bb5144a373e309c9ce0 DIST time-core-0.1.0.crate 6597 BLAKE2B 43137c5cbeb61a89c1cbbef325f2e2dc4b907d4c576553b202d178a64d46396958745b00c9f2aa60a6eb609d663e48b1f9bd1f7ebe58ff6e22540e96b2b1c7f2 SHA512 f7e181a40a0052d7aedf78219a46f8876618342c710e819748a87a5bc0728e5b2fc7ba08e38ebfa6a17d6fb60382003bb35745ff1eabac1c8f8b47d186a383db DIST time-core-0.1.1.crate 7197 BLAKE2B 9d0be2ef7111a8b66e5c750b2c372627ae4acfb2c68b0c6ed44b3c23bea1cdca4f65b24d2f2027b4d334667b1620019f4cb8c6d9799c1c2c537e6cfe692ab88a SHA512 a29d6619581d3fed73d6bc66a2c18805b80a3d54197feac5ad987a2c31d003bf4fef88a312d5315d2fa5c7d3e509066a65c1732be2ce280cf937bb4eff012e14 DIST time-macros-0.2.6.crate 19163 BLAKE2B 536e71931deb698a123c2a6ec58b8fcee8b1b46c80bd9712fe2f76b0b8ae9f15c216b69814c334d0f855d32d4c31a595c6297e16471fa4735bcedf6d158182f6 SHA512 5b6877ae37c602ffcd4d1f1367ab2c28bc906ee9635218fc01e5ec3b74e3cd14873f9029ada835f8658c04ca7cdf628a6c088a191119d4bc459b4c37e1f0fd10 +DIST time-macros-0.2.8.crate 24295 BLAKE2B 6b54c83b11db8c8490383764a0e6f3a2c3f17c44adab2d19e69dc3fc5b27c5a44bd57bd0e6885c54ae493bd5e2c05a6237f72be93a3a2fbf297c47c02d28c61d SHA512 4e604f926a620b1caeba90bc5de1129f6a6bb4548890d6e31306ac419c7b6d421b548b3887a929da3209fad28cba8d57b989503e52f16af243375d545b5aefde DIST time-macros-0.2.9.crate 23684 BLAKE2B 5484a3c5bca52fcff3fcd4e6f060ee24ce293fbdad1abd5819d0426eca29b95de866fe1273e0ed3431d1b94b12c37f23748d4cacb0112a67e9be0f49132d03ba SHA512 2fe094e61ca0ab708d60693367812f1b87fb9b6770dbfa3dad8a2aad7d2a000c24ae3b8960104d6c5b72b4a055c7715fa5d4d601eb7b7ea1764bb730aec86033 DIST tiny-keccak-2.0.2.crate 20129 BLAKE2B 105a2d2af36cc053cd95721ea563108f33b8a3feb2ae84c75a04a65ed5d548dfe35d8b2e48977a82f725c0ebcf914f21157c547f4a74bb4d98c2e894385139be SHA512 c0219f23361eb07e0a68575c461a36b7286d9bdebae89080d9e259178d402b0c7762ccf33e65a16951ea168392322c44a24eb55189cf143e22d09d6dfc4acec1 DIST tinyvec-1.6.0.crate 45991 BLAKE2B e9699d4d80a78978f0ebfd049f5b33d7f23d401cf4f4439ccb168e8c0e322473ad0ea7e2ff0ff69e9aac3e5c4c9ae5a7102185533bfbf96dbe77b3526e700bc9 SHA512 e5acaf353c58c60ae5556130a934f1048abb79cf6668ae467d308bac44b689d8a9997227ea879f4b5fe50f29cde8761801b088d7149bcd063b973056c381921c diff --git a/dev-util/maturin/maturin-0.15.0.ebuild b/dev-util/maturin/maturin-0.15.0.ebuild new file mode 100644 index 000000000000..ee39e5179621 --- /dev/null +++ b/dev-util/maturin/maturin-0.15.0.ebuild @@ -0,0 +1,477 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + adler-1.0.2 + ahash-0.7.6 + aho-corasick-0.7.20 + anyhow-1.0.71 + autocfg-1.1.0 + base64-0.13.1 + base64-0.21.0 + bitflags-1.3.2 + block-buffer-0.10.4 + bstr-1.4.0 + bumpalo-3.12.1 + byteorder-1.4.3 + bytes-1.4.0 + bytesize-1.2.0 + bzip2-0.4.4 + bzip2-sys-0.1.11+1.0.8 + cab-0.4.1 + camino-1.1.4 + cargo-config2-0.1.7 + cargo-options-0.6.0 + cargo-platform-0.1.2 + cargo-xwin-0.14.2 + cargo-zigbuild-0.16.7 + cargo_metadata-0.15.4 + cbindgen-0.24.3 + cc-1.0.79 + cfb-0.7.3 + cfg-expr-0.15.1 + cfg-if-1.0.0 + charset-0.1.3 + chumsky-0.9.2 + clap-4.1.10 + clap_complete-4.1.6 + clap_complete_command-0.5.1 + clap_complete_fig-4.1.2 + clap_complete_nushell-0.1.10 + clap_derive-4.1.9 + clap_lex-0.3.3 + cli-table-0.4.7 + concolor-0.0.11 + concolor-query-0.1.0 + configparser-3.0.2 + console-0.15.5 + content_inspector-0.2.4 + core-foundation-0.9.3 + core-foundation-sys-0.8.4 + cpufeatures-0.2.6 + crc32fast-1.3.2 + crossbeam-channel-0.5.8 + crossbeam-deque-0.8.3 + crossbeam-epoch-0.9.14 + crossbeam-utils-0.8.15 + crypto-common-0.1.6 + ctor-0.1.26 + data-encoding-2.3.3 + dialoguer-0.10.4 + diff-0.1.13 + digest-0.10.6 + dirs-4.0.0 + dirs-sys-0.3.7 + dunce-1.0.4 + either-1.8.1 + encode_unicode-0.3.6 + encoding_rs-0.8.32 + errno-0.2.8 + errno-dragonfly-0.1.2 + fastrand-1.9.0 + fat-macho-0.4.6 + filetime-0.2.19 + flate2-1.0.26 + fnv-1.0.7 + foreign-types-0.3.2 + foreign-types-shared-0.1.1 + form_urlencoded-1.1.0 + fs-err-2.9.0 + generic-array-0.14.7 + getrandom-0.2.9 + glob-0.3.1 + globset-0.4.10 + goblin-0.6.1 + hashbrown-0.12.3 + heck-0.4.1 + hermit-abi-0.2.6 + home-0.5.4 + humantime-2.1.0 + humantime-serde-1.1.1 + idna-0.3.0 + ignore-0.4.20 + indexmap-1.9.3 + indicatif-0.17.3 + indoc-2.0.1 + instant-0.1.12 + io-lifetimes-1.0.4 + is-terminal-0.4.2 + itertools-0.10.5 + itoa-1.0.6 + js-sys-0.3.61 + keyring-2.0.2 + lazy_static-1.4.0 + lddtree-0.3.2 + libc-0.2.142 + linux-keyutils-0.2.3 + linux-raw-sys-0.1.4 + lock_api-0.4.9 + log-0.4.17 + lzxd-0.1.4 + mailparse-0.13.8 + matchers-0.1.0 + memchr-2.5.0 + memoffset-0.8.0 + mime-0.3.17 + mime_guess-2.0.4 + minijinja-0.31.1 + minimal-lexical-0.2.1 + miniz_oxide-0.7.1 + msi-0.5.1 + multipart-0.18.0 + native-tls-0.2.11 + nom-7.1.3 + normalize-line-endings-0.3.0 + normpath-1.0.1 + nu-ansi-term-0.46.0 + num_cpus-1.15.0 + number_prefix-0.4.0 + once_cell-1.17.1 + openssl-0.10.50 + openssl-macros-0.1.0 + openssl-probe-0.1.5 + openssl-src-111.25.2+1.1.1t + openssl-sys-0.9.85 + os_pipe-1.1.2 + os_str_bytes-6.5.0 + output_vt100-0.1.3 + overload-0.1.1 + parking_lot-0.12.1 + parking_lot_core-0.9.6 + path-slash-0.2.1 + pep440_rs-0.3.6 + pep508_rs-0.1.5 + percent-encoding-2.2.0 + pin-project-lite-0.2.9 + pkg-config-0.3.26 + plain-0.2.3 + platform-info-1.0.2 + portable-atomic-0.3.19 + ppv-lite86-0.2.17 + pretty_assertions-1.3.0 + proc-macro-error-1.0.4 + proc-macro-error-attr-1.0.4 + proc-macro2-1.0.56 + psm-0.1.21 + pyproject-toml-0.6.0 + python-pkginfo-0.5.5 + quote-1.0.26 + quoted_printable-0.4.8 + rand-0.8.5 + rand_chacha-0.3.1 + rand_core-0.6.4 + rayon-1.7.0 + rayon-core-1.11.0 + redox_syscall-0.2.16 + redox_users-0.4.3 + regex-1.7.3 + regex-automata-0.1.10 + regex-syntax-0.6.29 + rfc2047-decoder-0.2.2 + ring-0.16.20 + rustc_version-0.4.0 + rustix-0.36.7 + rustls-0.20.8 + rustls-pemfile-1.0.2 + rustversion-1.0.12 + ryu-1.0.13 + same-file-1.0.6 + schannel-0.1.21 + scopeguard-1.1.0 + scroll-0.11.0 + scroll_derive-0.11.0 + sct-0.7.0 + security-framework-2.8.2 + security-framework-sys-2.8.0 + semver-1.0.17 + serde-1.0.155 + serde_derive-1.0.155 + serde_json-1.0.95 + serde_spanned-0.6.1 + sha2-0.10.6 + sharded-slab-0.1.4 + shell-escape-0.1.5 + shell-words-1.1.0 + shlex-1.1.0 + similar-2.2.1 + smallvec-1.10.0 + smawk-0.3.1 + snapbox-0.4.4 + snapbox-macros-0.3.1 + socks-0.3.4 + spin-0.5.2 + stacker-0.1.15 + static_assertions-1.1.0 + strsim-0.10.0 + syn-1.0.109 + tar-0.4.38 + target-lexicon-0.12.7 + tempfile-3.4.0 + termcolor-1.2.0 + terminal_size-0.2.3 + textwrap-0.16.0 + thiserror-1.0.39 + thiserror-impl-1.0.39 + thread_local-1.1.7 + time-0.3.20 + time-core-0.1.0 + time-macros-0.2.8 + tinyvec-1.6.0 + tinyvec_macros-0.1.1 + toml-0.5.11 + toml-0.7.3 + toml_datetime-0.6.1 + toml_edit-0.19.8 + tracing-0.1.37 + tracing-attributes-0.1.23 + tracing-core-0.1.30 + tracing-log-0.1.3 + tracing-serde-0.1.3 + tracing-subscriber-0.3.17 + trycmd-0.14.11 + twox-hash-1.6.3 + typenum-1.16.0 + unicase-2.6.0 + unicode-bidi-0.3.13 + unicode-ident-1.0.8 + unicode-linebreak-0.1.4 + unicode-normalization-0.1.22 + unicode-width-0.1.10 + untrusted-0.7.1 + ureq-2.6.2 + url-2.3.1 + uuid-1.3.1 + valuable-0.1.0 + vcpkg-0.2.15 + version_check-0.9.4 + versions-4.1.0 + wait-timeout-0.2.0 + walkdir-2.3.3 + wasi-0.11.0+wasi-snapshot-preview1 + wasm-bindgen-0.2.84 + wasm-bindgen-backend-0.2.84 + wasm-bindgen-macro-0.2.84 + wasm-bindgen-macro-support-0.2.84 + wasm-bindgen-shared-0.2.84 + web-sys-0.3.61 + webpki-0.22.0 + webpki-roots-0.22.6 + which-4.4.0 + wild-2.1.0 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-util-0.1.5 + winapi-x86_64-pc-windows-gnu-0.4.0 + windows-sys-0.42.0 + windows_aarch64_gnullvm-0.42.2 + windows_aarch64_msvc-0.42.2 + windows_i686_gnu-0.42.2 + windows_i686_msvc-0.42.2 + windows_x86_64_gnu-0.42.2 + windows_x86_64_gnullvm-0.42.2 + windows_x86_64_msvc-0.42.2 + winnow-0.4.6 + xattr-0.2.3 + xwin-0.2.12 + yansi-0.5.1 + zeroize-1.6.0 + zip-0.6.4" +# additional crates used by test-crates/* test packages, +# `grep test-crates tests/run.rs` to see which are needed +CRATES_TEST=" + anyhow-1.0.69 + askama-0.11.1 + askama_derive-0.11.2 + askama_escape-0.10.3 + askama_shared-0.12.2 + bincode-1.3.3 + camino-1.1.2 + cargo_metadata-0.15.3 + cc-1.0.73 + cc-1.0.74 + getrandom-0.2.8 + goblin-0.6.0 + indoc-1.0.7 + itoa-1.0.5 + libc-0.2.134 + libc-0.2.137 + libc-0.2.141 + mime-0.3.16 + once_cell-1.15.0 + once_cell-1.16.0 + once_cell-1.17.0 + parking_lot_core-0.9.3 + parking_lot_core-0.9.4 + parking_lot_core-0.9.7 + paste-1.0.11 + proc-macro2-1.0.46 + proc-macro2-1.0.47 + proc-macro2-1.0.51 + pyo3-0.18.1 + pyo3-0.18.3 + pyo3-build-config-0.18.1 + pyo3-build-config-0.18.3 + pyo3-ffi-0.18.1 + pyo3-ffi-0.18.3 + pyo3-macros-0.18.1 + pyo3-macros-backend-0.18.1 + python3-dll-a-0.2.6 + quote-1.0.21 + quote-1.0.23 + ryu-1.0.12 + semver-1.0.16 + serde-1.0.152 + serde_derive-1.0.152 + serde_json-1.0.93 + siphasher-0.3.10 + syn-1.0.102 + syn-1.0.103 + syn-1.0.107 + thiserror-1.0.38 + thiserror-impl-1.0.38 + unicode-ident-1.0.5 + unicode-ident-1.0.6 + uniffi-0.23.0 + uniffi_bindgen-0.23.0 + uniffi_build-0.23.0 + uniffi_checksum_derive-0.23.0 + uniffi_core-0.23.0 + uniffi_macros-0.23.0 + uniffi_meta-0.23.0 + uniffi_testing-0.23.0 + unindent-0.1.10 + weedle2-4.0.0 + windows-sys-0.36.1 + windows-sys-0.45.0 + windows-targets-0.42.2 + windows_aarch64_gnullvm-0.42.0 + windows_aarch64_msvc-0.36.1 + windows_aarch64_msvc-0.42.0 + windows_i686_gnu-0.36.1 + windows_i686_gnu-0.42.0 + windows_i686_msvc-0.36.1 + windows_i686_msvc-0.42.0 + windows_x86_64_gnu-0.36.1 + windows_x86_64_gnu-0.42.0 + windows_x86_64_gnullvm-0.42.0 + windows_x86_64_msvc-0.36.1 + windows_x86_64_msvc-0.42.0" +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{9..11} ) +inherit bash-completion-r1 cargo distutils-r1 edo flag-o-matic 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 + $(cargo_crate_uris) + test? ( $(cargo_crate_uris ${CRATES_TEST}) )" + +# note: ring is unused, so SSLeay+openssl licenses can be skipped +LICENSE=" + 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC + MIT MPL-2.0 Unicode-DFS-2016 doc? ( CC-BY-4.0 OFL-1.1 )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="doc +ssl test" +RESTRICT="!test? ( test )" + +RDEPEND="$(python_gen_cond_dep 'dev-python/tomli[${PYTHON_USEDEP}]' 3.{9..10})" +DEPEND="ssl? ( dev-libs/openssl:= )" +BDEPEND=" + dev-python/setuptools-rust[${PYTHON_USEDEP}] + doc? ( app-text/mdbook ) + test? ( + ${RDEPEND} + $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') + dev-python/boltons[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-vcs/git + )" +RDEPEND+=" ${DEPEND}" + +QA_FLAGS_IGNORED="usr/bin/${PN}" + +src_prepare() { + distutils-r1_src_prepare + + if use test; then + # used to prevent use of network during tests + cat > "${T}"/pip.conf <<-EOF || die + [install] + no-index = yes + no-dependencies = yes + EOF + + # needed 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() { + filter-lto # TODO: cleanup after bug #893658 + + local cargoargs=( + # TODO: try switching to `--profile gentoo` then should be able to + # remove all `use debug` checks and --release in tests, but needs: + # https://github.com/gentoo/gentoo/pull/29510 + $(usev debug '--profile dev') + --no-default-features + # like release.yml + native-tls for better platform support than rustls + --features full,password-storage$(usev ssl ,native-tls) + ) + + export MATURIN_SETUP_ARGS=${cargoargs[*]} # --no-default-features if empty + export OPENSSL_NO_VENDOR=1 +} + +python_compile_all() { + use !doc || mdbook build -d html guide || die + + if ! tc-is-cross-compiler; then + local maturin=target/$(usex debug{,} release)/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 COLUMNS=100 # what tests/cmd was generated for + local -x MATURIN_TEST_PYTHON=${EPYTHON} + local -x PIP_CONFIG_FILE=${T}/pip.conf + local -x VIRTUALENV_SYSTEM_SITE_PACKAGES=1 + + local skip=( + # 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 + ) + + edo cargo test $(usev !debug --release) ${MATURIN_SETUP_ARGS} -- "${skip[@]}" +} + +python_install_all() { + dodoc Changelog.md README.md + use doc && dodoc -r guide/html + + if ! tc-is-cross-compiler; then + dobashcomp "${T}"/${PN} + + insinto /usr/share/fish/vendor_completions.d + doins "${T}"/${PN}.fish + + insinto /usr/share/zsh/site-functions + doins "${T}"/_${PN} + fi +} |