6a2b315affe45108f4363ebf0890bd68128bc672
[gentoo.git] / dev-python / aiohttp-cors / aiohttp-cors-0.6.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_{5,6,7} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous HTTP server"
11 HOMEPAGE="https://github.com/aio-libs/aiohttp-cors"
12 SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13 EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors"
14
15 LICENSE="Apache-2.0"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? (
25                 dev-python/pylint[${PYTHON_USEDEP}]
26                 dev-python/pytest[${PYTHON_USEDEP}]
27                 dev-python/pytest-cov[${PYTHON_USEDEP}]
28                 dev-python/pytest-pylint[${PYTHON_USEDEP}]
29                 dev-python/pytest-runner[${PYTHON_USEDEP}]
30                 dev-python/selenium[${PYTHON_USEDEP}]
31         )"
32
33 python_prepare_all() {
34         # for some reason, it is installed by 'setup.py test' on py!=3.4
35         # TODO: investigate
36         sed -i -e '/typing/d' setup.py || die
37         distutils-r1_python_prepare_all
38 }
39
40 python_test() {
41         esetup.py test
42 }