diff options
Diffstat (limited to 'dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild')
-rw-r--r-- | dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild b/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild index 7e449920dc7f..9b27fc1c0416 100644 --- a/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild +++ b/dev-python/aiohttp-socks/aiohttp-socks-0.2.2.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6,7} ) inherit distutils-r1 @@ -13,11 +13,27 @@ SRC_URI="https://github.com/romis2012/aiohttp-socks/archive/${PV}.tar.gz -> ${P} LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" +KEYWORDS="amd64 x86" +IUSE="test" +# Tests require Internet access +RESTRICT="test" -RDEPEND=" - >=dev-python/aiohttp-2.3.2[${PYTHON_USEDEP}] -" +RDEPEND=">=dev-python/aiohttp-2.3.2[${PYTHON_USEDEP}]" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + net-proxy/3proxy + )" -DOCS=( README.md ) +python_configure_all() { + rm tests/3proxy/bin/*/* || die + if use test; then + ln -s "$(type -P 3proxy)" tests/3proxy/bin/linux/ || die + fi +} + +python_test() { + pytest -vv || die "Tests fail with ${EPYTHON}" +} |