*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / async_timeout / async_timeout-1.2.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_6 )
6
7 inherit distutils-r1
8
9 MY_P=${PN/_/-}-${PV}
10 DESCRIPTION="Timeout context manager for asyncio programs"
11 HOMEPAGE="https://github.com/aio-libs/async-timeout"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19 S=${WORKDIR}/${MY_P}
20
21 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
22         dev-python/setuptools_scm[${PYTHON_USEDEP}]
23         test? ( dev-python/pytest-aiohttp[${PYTHON_USEDEP}] )"
24
25 python_prepare_all() {
26         sed -i "s:, 'pytest-runner'::" -i setup.py || die
27         distutils-r1_python_prepare_all
28 }
29
30 python_test() {
31         py.test -v || die "Tests fail with ${EPYTHON}"
32 }