Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 4/4] dev-python/trustme: Example use of distutils_enable_tests
Date: Mon, 04 Nov 2019 21:01:41
Message-Id: 20191104210013.49303-4-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_tests to ease testing by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 dev-python/trustme/trustme-0.5.2.ebuild | 9 ++-------
4 1 file changed, 2 insertions(+), 7 deletions(-)
5
6 diff --git a/dev-python/trustme/trustme-0.5.2.ebuild b/dev-python/trustme/trustme-0.5.2.ebuild
7 index ee3f8b306297..eb4e41b0cf42 100644
8 --- a/dev-python/trustme/trustme-0.5.2.ebuild
9 +++ b/dev-python/trustme/trustme-0.5.2.ebuild
10 @@ -14,20 +14,15 @@ LICENSE="|| ( Apache-2.0 MIT )"
11 SLOT="0"
12 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
13 IUSE="test"
14 -RESTRICT="!test? ( test )"
15
16 RDEPEND="dev-python/cryptography[${PYTHON_USEDEP}]
17 dev-python/idna[${PYTHON_USEDEP}]
18 $(python_gen_cond_dep '>=dev-python/ipaddress-1.0.16[${PYTHON_USEDEP}]' -2 )"
19 -DEPEND="${RDEPEND}
20 - dev-python/setuptools[${PYTHON_USEDEP}]
21 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
22 test? (
23 - dev-python/pytest[${PYTHON_USEDEP}]
24 dev-python/pyopenssl[${PYTHON_USEDEP}]
25 dev-python/service_identity[${PYTHON_USEDEP}]
26 $(python_gen_cond_dep 'dev-python/futures[${PYTHON_USEDEP}]' -2 )
27 )"
28
29 -python_test() {
30 - pytest -vv || die "Tests failed under ${EPYTHON}"
31 -}
32 +distutils_enable_tests pytest
33 --
34 2.23.0