Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pytest-benchmark/
Date: Sun, 29 Mar 2020 13:21:21
Message-Id: 1585483306.57fe81e30629df5f2bee32aa4cf834022fe67fbe.andrewammerlaan@gentoo
1 commit: 57fe81e30629df5f2bee32aa4cf834022fe67fbe
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Sun Mar 29 12:01:46 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Sun Mar 29 12:01:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=57fe81e3
7
8 dev-python/pytest-benchmark: tried and failed to fix tests
9
10 Package-Manager: Portage-2.3.96, Repoman-2.3.22
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
12
13 dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild | 14 +++++++++++++-
14 1 file changed, 13 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild b/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
17 index 82b9e64..5652413 100644
18 --- a/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
19 +++ b/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
20 @@ -3,7 +3,7 @@
21
22 EAPI="7"
23
24 -#DISTUTILS_USE_SETUPTOOLS=rdepend
25 +DISTUTILS_USE_SETUPTOOLS=rdepend
26 PYTHON_COMPAT=( python3_6 )
27
28 inherit distutils-r1
29 @@ -19,6 +19,11 @@ LICENSE="BSD-2"
30 SLOT="0"
31 KEYWORDS="~amd64 ~x86"
32
33 +# during tests import fails because conflict with the already installed files
34 +# not sure how to fix, it would require setting some python variables but that would
35 +# probably lead to all other packages being unfindable by the tests
36 +RESTRICT="test"
37 +
38 RDEPEND="
39 dev-python/py-cpuinfo[${PYTHON_USEDEP}]
40 "
41 @@ -39,3 +44,10 @@ BDEPEND="
42
43 distutils_enable_tests pytest
44 distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme
45 +
46 +python_test() {
47 + # has to be run in source dir
48 + PYTHONPATH="${S}"
49 + cd "${S}" || die
50 + pytest -vv || die "Tests fail with ${EPYTHON}"
51 +}