From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5FC6F158086 for ; Fri, 15 Oct 2021 15:53:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7178DE0831; Fri, 15 Oct 2021 15:53:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4CA62E0831 for ; Fri, 15 Oct 2021 15:53:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0B30E343016 for ; Fri, 15 Oct 2021 15:53:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 83D18132 for ; Fri, 15 Oct 2021 15:53:37 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1634312630.68a24f96d692888b024ae5ddc877b6f31d63f6ae.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/adblock/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/adblock/adblock-0.5.0.ebuild X-VCS-Directories: dev-python/adblock/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 68a24f96d692888b024ae5ddc877b6f31d63f6ae X-VCS-Branch: master Date: Fri, 15 Oct 2021 15:53:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b3b57101-a333-4d64-b027-994de3655e77 X-Archives-Hash: 6ec0a33c9f9acce3b444e9f3b068a3d5 commit: 68a24f96d692888b024ae5ddc877b6f31d63f6ae Author: Ionen Wolkens gentoo org> AuthorDate: Fri Oct 8 18:54:15 2021 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Fri Oct 15 15:43:50 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68a24f96 dev-python/adblock: EAPI7->8, tidy, add python3_10 Also: * fix install with USE=debug (library is in target/debug/) * skip installing /usr/lib*/libadblock.so as it's the same file as adblock.abi3.so and is only needed in python's site dir * add missing dev-python/toml test dependency * add licenses for used crates (needs both former options at once removing the use for ||) Signed-off-by: Ionen Wolkens gentoo.org> dev-python/adblock/adblock-0.5.0.ebuild | 179 +++++++++++++++++--------------- 1 file changed, 93 insertions(+), 86 deletions(-) diff --git a/dev-python/adblock/adblock-0.5.0.ebuild b/dev-python/adblock/adblock-0.5.0.ebuild index 5ef500a3655..d611b5ade79 100644 --- a/dev-python/adblock/adblock-0.5.0.ebuild +++ b/dev-python/adblock/adblock-0.5.0.ebuild @@ -1,113 +1,120 @@ # Copyright 2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 CRATES=" -adblock-0.3.13 -addr-0.14.0 -adler-1.0.2 -aho-corasick-0.7.18 -autocfg-1.0.1 -base64-0.13.0 -bitflags-1.2.1 -byteorder-1.4.3 -cfg-if-1.0.0 -crc32fast-1.2.1 -ctor-0.1.20 -either-1.6.1 -flate2-1.0.20 -form_urlencoded-1.0.1 -ghost-0.1.2 -idna-0.2.2 -indoc-0.3.6 -indoc-impl-0.3.6 -instant-0.1.9 -inventory-0.1.10 -inventory-impl-0.1.10 -itertools-0.9.0 -libc-0.2.93 -lock_api-0.4.3 -matches-0.1.8 -memchr-2.4.0 -miniz_oxide-0.4.4 -num-traits-0.2.14 -once_cell-1.7.2 -parking_lot-0.11.1 -parking_lot_core-0.8.3 -paste-0.1.18 -paste-impl-0.1.18 -percent-encoding-2.1.0 -proc-macro-hack-0.5.19 -proc-macro2-1.0.26 -psl-2.0.18 -psl-types-2.0.7 -pyo3-0.13.2 -pyo3-macros-0.13.2 -pyo3-macros-backend-0.13.2 -quote-1.0.9 -redox_syscall-0.2.5 -regex-1.5.4 -regex-syntax-0.6.25 -rmp-0.8.10 -rmp-serde-0.13.7 -scopeguard-1.1.0 -seahash-3.0.7 -serde-1.0.125 -serde_derive-1.0.125 -smallvec-1.6.1 -syn-1.0.69 -tinyvec-1.2.0 -tinyvec_macros-0.1.0 -twoway-0.2.1 -unchecked-index-0.2.2 -unicode-bidi-0.3.5 -unicode-normalization-0.1.17 -unicode-xid-0.2.1 -unindent-0.1.7 -url-2.2.1 -winapi-0.3.9 -winapi-i686-pc-windows-gnu-0.4.0 -winapi-x86_64-pc-windows-gnu-0.4.0 -" -PYTHON_COMPAT=( python3_{8,9} ) - + adblock-0.3.13 + addr-0.14.0 + adler-1.0.2 + aho-corasick-0.7.18 + autocfg-1.0.1 + base64-0.13.0 + bitflags-1.2.1 + byteorder-1.4.3 + cfg-if-1.0.0 + crc32fast-1.2.1 + ctor-0.1.20 + either-1.6.1 + flate2-1.0.20 + form_urlencoded-1.0.1 + ghost-0.1.2 + idna-0.2.2 + indoc-0.3.6 + indoc-impl-0.3.6 + instant-0.1.9 + inventory-0.1.10 + inventory-impl-0.1.10 + itertools-0.9.0 + libc-0.2.93 + lock_api-0.4.3 + matches-0.1.8 + memchr-2.4.0 + miniz_oxide-0.4.4 + num-traits-0.2.14 + once_cell-1.7.2 + parking_lot-0.11.1 + parking_lot_core-0.8.3 + paste-0.1.18 + paste-impl-0.1.18 + percent-encoding-2.1.0 + proc-macro-hack-0.5.19 + proc-macro2-1.0.26 + psl-2.0.18 + psl-types-2.0.7 + pyo3-0.13.2 + pyo3-macros-0.13.2 + pyo3-macros-backend-0.13.2 + quote-1.0.9 + redox_syscall-0.2.5 + regex-1.5.4 + regex-syntax-0.6.25 + rmp-0.8.10 + rmp-serde-0.13.7 + scopeguard-1.1.0 + seahash-3.0.7 + serde-1.0.125 + serde_derive-1.0.125 + smallvec-1.6.1 + syn-1.0.69 + tinyvec-1.2.0 + tinyvec_macros-0.1.0 + twoway-0.2.1 + unchecked-index-0.2.2 + unicode-bidi-0.3.5 + unicode-normalization-0.1.17 + unicode-xid-0.2.1 + unindent-0.1.7 + url-2.2.1 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-x86_64-pc-windows-gnu-0.4.0" +PYTHON_COMPAT=( python3_{8..10} ) inherit cargo python-r1 DESCRIPTION="Python wrapper for Brave's adblocking library, which is written in Rust" HOMEPAGE="https://github.com/ArniDagur/python-adblock" -SRC_URI="https://github.com/ArniDagur/python-adblock/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz - $(cargo_crate_uris ${CRATES})" +SRC_URI=" + https://github.com/ArniDagur/python-adblock/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + $(cargo_crate_uris)" S="${WORKDIR}/python-${P}" -LICENSE="|| ( Apache-2.0 MIT )" +LICENSE="Apache-2.0 BSD MIT MPL-2.0" SLOT="0" KEYWORDS="~amd64" -IUSE="debug test" +IUSE="test" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" RDEPEND="${PYTHON_DEPS}" -DEPEND="${RDEPEND}" -BDEPEND="app-arch/unzip +BDEPEND=" + ${PYTHON_DEPS} dev-util/maturin - test? ( dev-python/pytest[${PYTHON_USEDEP}] )" + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/toml[${PYTHON_USEDEP}] + )" -QA_FLAGS_IGNORED="usr/lib.*/libadblock.so - usr/lib/python3.*/site-packages/adblock/adblock.abi3.so" -QA_SONAME="${QA_FLAGS_IGNORED}" +QA_FLAGS_IGNORED="usr/lib/python3.*/site-packages/adblock/adblock.abi3.so" src_compile() { - maturin build $(usex debug "" --release) --no-sdist || die - unzip "target/wheels/${P}-*.whl" adblock/adblock.abi3.so || die -} + maturin build $(usev !debug --release) --no-sdist || die -src_install() { - python_foreach_impl python_domodule adblock - dolib.so target/release/libadblock.so - dodoc CHANGELOG.md README.md + mv target/$(usex debug{,} release)/libadblock.so \ + adblock/adblock.abi3.so || die } src_test() { + local EPYTEST_DESELECT=( + # tests if python-3.10 >= 3.6, but results in 3.1 < 3.6 + tests/test_metadata.py::test_required_python_version + ) + python_foreach_impl epytest } + +src_install() { + python_foreach_impl python_domodule adblock + + dodoc CHANGELOG.md README.md +}