dev-python/aiohttp: add version 0.17.4
[gentoo.git] / dev-python / aiohttp / aiohttp-0.17.4.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/aiohttp/aiohttp-0.14.4-r1.ebuild,v 1.1 2015/03/16 11:08:45 bman Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python3_3 python3_4 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="http client/server for asyncio"
12 HOMEPAGE="https://github.com/KeepSafe/aiohttp https://pypi.python.org/pypi/aiohttp"
13 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="Apache-2.0"
16 SLOT="0"
17 KEYWORDS="~amd64"
18 IUSE="doc examples test"
19
20 CDEPEND="
21         dev-python/chardet[${PYTHON_USEDEP}]
22         $(python_gen_cond_dep 'dev-python/asyncio[${PYTHON_USEDEP}]' 'python3_3')
23         $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'python3_3')
24 "
25 DEPEND="
26         dev-python/setuptools[${PYTHON_USEDEP}]
27         dev-python/cython[${PYTHON_USEDEP}]
28         doc? (
29                 >=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
30                 dev-python/sphinxcontrib-newsfeed[${PYTHON_USEDEP}]
31                 dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
32                 dev-python/sphinx[${PYTHON_USEDEP}]
33         )
34         test? (
35                 ${CDEPEND}
36                 dev-python/nose[${PYTHON_USEDEP}]
37                 www-servers/gunicorn[${PYTHON_USEDEP}]
38         )
39 "
40 RDEPEND="${CDEPEND}"
41
42 python_compile_all() {
43         use doc && emake -C docs html
44 }
45
46 python_test() {
47         PYTHONPATH="$(PWD):${PYTHONPATH}" nosetests tests/ || die "Tests failed under ${EPYTHON}"
48 }
49
50 python_install_all() {
51         use doc && local HTML_DOCS=( docs/_build/html/. )
52         use examples && local EXAMPLES=( examples/. )
53
54         distutils-r1_python_install_all
55 }