1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # http://www.gevent.org/whatsnew_1_1.html#broader-platform-support
7 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
8 PYTHON_REQ_USE="ssl(+),threads(+)"
10 inherit distutils-r1 flag-o-matic
15 DESCRIPTION="Coroutine-based network library"
16 HOMEPAGE="http://gevent.org/ https://pypi.python.org/pypi/gevent/"
17 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
21 KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
27 >=dev-python/greenlet-0.4.10
28 virtual/python-greenlet[${PYTHON_USEDEP}]"
30 dev-python/setuptools[${PYTHON_USEDEP}]
31 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
33 # Tests take long and fail terribly a few times.
34 # It also seems that they require network access.
39 python_prepare_all() {
40 export LIBEV_EMBED="false"
41 export CARES_EMBED="false"
44 distutils-r1_python_prepare_all
47 python_configure_all() {
48 append-flags -fno-strict-aliasing
51 python_compile_all() {
52 use doc && emake -C doc html
56 cd src/greentest || die
58 GEVENT_RESOLVER=thread \
59 "${PYTHON}" testrunner.py --config known_failures.py || die
60 GEVENT_RESOLVER=ares GEVENTARES_SERVERS=8.8.8.8 \
61 "${PYTHON}" testrunner.py --config known_failures.py \
62 --ignore tests_that_dont_use_resolver.txt || die
64 "${PYTHON}" testrunner.py --config known_failures.py $(grep -l subprocess test_*.py) || die
67 python_install_all() {
68 local DOCS=( AUTHORS README.rst )
69 use doc && local HTML_DOCS=( doc/_build/html/. )
70 use examples && dodoc -r examples
72 distutils-r1_python_install_all