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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE02815800A for ; Sun, 6 Aug 2023 07:53:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A97B2BC013; Sun, 6 Aug 2023 07:53:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFAA02BC013 for ; Sun, 6 Aug 2023 07:53:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC06C340DE7 for ; Sun, 6 Aug 2023 07:53:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2AFD5F15 for ; Sun, 6 Aug 2023 07:53:07 +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: <1691308337.8f21806af82d1f9af46527189c7c97077d502341.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.6.0.ebuild X-VCS-Directories: dev-python/adblock/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 8f21806af82d1f9af46527189c7c97077d502341 X-VCS-Branch: master Date: Sun, 6 Aug 2023 07:53:07 +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: 6b076e75-ab34-4a38-a6e6-4275deaf049e X-Archives-Hash: 20256dcb8a86769464edb058e21a6ffb commit: 8f21806af82d1f9af46527189c7c97077d502341 Author: Ionen Wolkens gentoo org> AuthorDate: Sun Aug 6 07:39:13 2023 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Sun Aug 6 07:52:17 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f21806a dev-python/adblock: modernize, update pytest handling Matches the (new) recommendation from the gentoo python guide and does not needlessly cause issues with the new experimental QA check from python-utils-r1. Considered just fixing how the test looks for adblock.pyi but I do not believe this test makes much sense downstream, so may as well just skip it. Ideal would be for adblock upstream to update to use the (new) directory layout that maturin recommends. Also bit of style reverting while here, changed my mind on that. Signed-off-by: Ionen Wolkens gentoo.org> dev-python/adblock/adblock-0.6.0.ebuild | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/dev-python/adblock/adblock-0.6.0.ebuild b/dev-python/adblock/adblock-0.6.0.ebuild index b25860323125..720f90e60bfc 100644 --- a/dev-python/adblock/adblock-0.6.0.ebuild +++ b/dev-python/adblock/adblock-0.6.0.ebuild @@ -67,7 +67,8 @@ CRATES=" windows_i686_gnu@0.36.1 windows_i686_msvc@0.36.1 windows_x86_64_gnu@0.36.1 - windows_x86_64_msvc@0.36.1" + windows_x86_64_msvc@0.36.1 +" DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=maturin PYTHON_COMPAT=( python3_{10..12} ) @@ -78,13 +79,15 @@ HOMEPAGE="https://github.com/ArniDagur/python-adblock" SRC_URI=" https://github.com/ArniDagur/python-adblock/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz - ${CARGO_CRATE_URIS}" + ${CARGO_CRATE_URIS} +" S="${WORKDIR}/python-${P}" LICENSE="|| ( MIT Apache-2.0 )" LICENSE+=" Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT MPL-2.0 - Unicode-DFS-2016" # crates + Unicode-DFS-2016 +" # crates SLOT="0" KEYWORDS="amd64 ~arm64 ~x86" @@ -98,16 +101,18 @@ PATCHES=( "${FILESDIR}"/${P}-maturin-0.14.13.patch ) -EPYTEST_IGNORE=( - # not very meaningful here (e.g. validates changelog), - # and needs the deprecated dev-python/toml - tests/test_metadata.py -) - -src_compile() { - distutils-r1_src_compile +python_test() { + local EPYTEST_DESELECT=( + # unimportant (for us) test that uses the dir that we delete below + # so pytest does not try to load it while lacking extensions + tests/test_typestubs.py::test_functions_and_methods_exist_in_rust + ) + local EPYTEST_IGNORE=( + # not very meaningful here (e.g. validates changelog), + # and needs the deprecated dev-python/toml + tests/test_metadata.py + ) - # prevent pytest from using ./adblock that lack the built module - # but the keep directory given tests check ./adblock/adblock.pyi - rm adblock/__init__.py || die + rm -rf adblock || die + epytest }