dev-python/rosdistro: initial import. ebuild by me.
[gentoo.git] / dev-python / gevent / gevent-1.0.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python2_7 )
7 PYTHON_REQ_USE="ssl"
8
9 inherit distutils-r1 flag-o-matic
10
11 MY_PV=${PV/_/}
12 MY_P=${PN}-${MY_PV}
13
14 DESCRIPTION="Python networking library that uses greenlet to provide synchronous API"
15 HOMEPAGE="http://gevent.org/ https://pypi.python.org/pypi/gevent/"
16 SRC_URI="https://github.com/surfly/${PN}/releases/download/${MY_PV}/${MY_P}.tar.gz"
17
18 LICENSE="MIT"
19 SLOT="0"
20 KEYWORDS="amd64 arm ~ppc ppc64 x86 ~amd64-linux ~x86-linux"
21 IUSE="doc examples"
22
23 RDEPEND="dev-libs/libev
24         net-dns/c-ares
25         >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]"
26 DEPEND="${RDEPEND}
27         dev-python/setuptools[${PYTHON_USEDEP}]
28         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
29
30 # Tests take long and fail terribly a few times.
31 # It also seems that they require network access.
32 RESTRICT="test"
33
34 S=${WORKDIR}/${MY_P}
35
36 python_prepare_all() {
37         rm -r {libev,c-ares} || die
38
39         distutils-r1_python_prepare_all
40 }
41
42 python_configure_all() {
43         append-flags -fno-strict-aliasing
44 }
45
46 python_compile_all() {
47         use doc && emake -C doc html
48 }
49
50 python_test() {
51         cd greentest || die
52         "${PYTHON}" testrunner.py || die "Tests fail with ${EPYTHON}"
53 }
54
55 python_install_all() {
56         use doc && local HTML_DOCS=( doc/_build/html/. )
57
58         distutils-r1_python_install_all
59
60         dodoc changelog.rst
61
62         if use examples; then
63                 dodoc -r examples
64                 docompress -x /usr/share/doc/${PF}/examples
65         fi
66 }