dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / dev-python / aiohttp-socks / aiohttp-socks-0.2.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="SOCKS proxy connector for aiohttp"
11 HOMEPAGE="https://pypi.org/project/aiohttp-socks/"
12 SRC_URI="https://github.com/romis2012/aiohttp-socks/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="test"
18 # Tests require Internet access
19 RESTRICT="test"
20
21 RDEPEND=">=dev-python/aiohttp-2.3.2[${PYTHON_USEDEP}]"
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23         test? (
24                 ${RDEPEND}
25                 dev-python/pytest[${PYTHON_USEDEP}]
26                 dev-python/pytest-asyncio[${PYTHON_USEDEP}]
27                 net-proxy/3proxy
28         )"
29
30 python_configure_all() {
31         rm tests/3proxy/bin/*/* || die
32         if use test; then
33                 ln -s "$(type -P 3proxy)" tests/3proxy/bin/linux/ || die
34         fi
35 }
36
37 python_test() {
38         pytest -vv || die "Tests fail with ${EPYTHON}"
39 }