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 9BCF4158F6F for ; Mon, 16 Aug 2021 20:48:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3D5B6E0FC0; Mon, 16 Aug 2021 19:05:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CD586E0FC2 for ; Mon, 16 Aug 2021 19:05:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D6AF347695 for ; Mon, 16 Aug 2021 19:04:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0C078C2 for ; Mon, 16 Aug 2021 19:04:56 +0000 (UTC) From: "Jian Lin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jian Lin" Message-ID: <1628906374.03c1950da93401e516371bb0135e4d0e10a26f26.jian@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-python/pytest-benchmark/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild X-VCS-Directories: dev-python/pytest-benchmark/ X-VCS-Committer: jian X-VCS-Committer-Name: Jian Lin X-VCS-Revision: 03c1950da93401e516371bb0135e4d0e10a26f26 X-VCS-Branch: master Date: Mon, 16 Aug 2021 19:04:56 +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: 6e68d42a-16c1-4dcd-bf58-66b10af580ac X-Archives-Hash: 308314b396ba5759581ef6c353f61caf commit: 03c1950da93401e516371bb0135e4d0e10a26f26 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Aug 14 01:38:34 2021 +0000 Commit: Jian Lin outlook com> CommitDate: Sat Aug 14 01:59:34 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=03c1950d dev-python/pytest-benchmark: bump EAPI, enable py3.10 And fix tests (that was hard...) Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> .../pytest-benchmark/pytest-benchmark-3.4.1.ebuild | 55 +++++++++++----------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild index e342f4803..3cc5d7a49 100644 --- a/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild +++ b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild @@ -1,11 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{8..9} ) +EAPI=8 +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 DESCRIPTION="py.test fixture for benchmarking code " @@ -19,34 +17,35 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~x86" -# during tests import fails because conflict with the already installed files -# not sure how to fix, it would require setting some python variables but that would -# probably lead to all other packages being unfindable by the tests -RESTRICT="test" +DOCS=( AUTHORS.rst CHANGELOG.rst README.rst ) -RDEPEND=" - dev-python/py-cpuinfo[${PYTHON_USEDEP}] -" -BDEPEND=" - ${RDEPEND} - test? ( - dev-python/aspectlib[${PYTHON_USEDEP}] - dev-python/elasticsearch-py[${PYTHON_USEDEP}] - dev-python/freezegun[${PYTHON_USEDEP}] - dev-python/hunter[${PYTHON_USEDEP}] - dev-python/pygal[${PYTHON_USEDEP}] - dev-python/pygaljs[${PYTHON_USEDEP}] - dev-python/pytest-instafail[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - ) -" +RDEPEND="dev-python/py-cpuinfo[${PYTHON_USEDEP}]" +BDEPEND="test? ( + dev-python/aspectlib[${PYTHON_USEDEP}] + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/hunter[${PYTHON_USEDEP}] + dev-python/pygal[${PYTHON_USEDEP}] + dev-python/pygaljs[${PYTHON_USEDEP}] + $(python_gen_cond_dep \ + 'dev-python/elasticsearch-py[${PYTHON_USEDEP}]' python3_8 python3_9 ) +)" distutils_enable_tests pytest distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme +python_prepare() { + if [[ ${EPYTHON} == python3.10 ]]; then + rm tests/test_elasticsearch_storage.py || die + fi +} + python_test() { - # has to be run in source dir - PYTHONPATH="${S}" - cd "${S}" || die - pytest -vv || die "Tests fail with ${EPYTHON}" + local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}" + local epytest_args=( + -o markers=benchmark + --deselect tests/test_cli.py::test_help + --deselect tests/test_cli.py::test_help_compare + ) + + epytest "${epytest_args[@]}" }