Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp-socks/
Date: Tue, 30 Jul 2019 14:39:38
Message-Id: 1564497572.300155f33382fea506d5cbfd1bf6518b827ad3ff.mgorny@gentoo
1 commit: 300155f33382fea506d5cbfd1bf6518b827ad3ff
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 30 14:28:19 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 30 14:39:32 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=300155f3
7
8 dev-python/aiohttp-socks: Add testing code, correct deps, EAPI 7
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../aiohttp-socks/aiohttp-socks-0.2.2.ebuild | 26 +++++++++++++++++-----
13 1 file changed, 20 insertions(+), 6 deletions(-)
14
15 diff --git a/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild b/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild
16 index 52758134c3e..e38b826b03d 100644
17 --- a/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild
18 +++ b/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild
19 @@ -1,7 +1,7 @@
20 # Copyright 1999-2019 Gentoo Authors
21 # Distributed under the terms of the GNU General Public License v2
22
23 -EAPI=6
24 +EAPI=7
25
26 PYTHON_COMPAT=( python3_{6,7} )
27
28 @@ -14,10 +14,24 @@ SRC_URI="https://github.com/romis2012/aiohttp-socks/archive/${PV}.tar.gz -> ${P}
29 LICENSE="Apache-2.0"
30 SLOT="0"
31 KEYWORDS="~amd64 ~x86"
32 -IUSE=""
33 +IUSE="test"
34 +# Tests require Internet access
35 +RESTRICT="test"
36
37 -RDEPEND="
38 - >=dev-python/aiohttp-2.3.2[${PYTHON_USEDEP}]
39 -"
40 +RDEPEND=">=dev-python/aiohttp-2.3.2[${PYTHON_USEDEP}]"
41 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
42 + test? (
43 + ${RDEPEND}
44 + dev-python/pytest[${PYTHON_USEDEP}]
45 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
46 + net-proxy/3proxy
47 + )"
48
49 -DOCS=( README.md )
50 +python_configure_all() {
51 + rm tests/3proxy/bin/*/* || die
52 + ln -s "$(type -P 3proxy)" tests/3proxy/bin/linux/ || die
53 +}
54 +
55 +python_test() {
56 + pytest -vv || die "Tests fail with ${EPYTHON}"
57 +}