clean old python impls, add py3.3 3.4 support, add IUSE test and testrunner dep,...
[wtk-overlay.git] / execnet-1.2.0-r1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
8
9 inherit distutils-r1
10
11 DESCRIPTION="Rapid multi-Python deployment"
12 HOMEPAGE="http://codespeak.net/execnet/ http://pypi.python.org/pypi/execnet/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="doc test"
19
20 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
21         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
22         test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
23 RDEPEND=""
24
25 python_prepare_all() {
26         # Remove doctest that access an i'net sire
27         rm doc/example/test_info.txt || die
28
29         distutils-r1_python_prepare_all
30 }
31
32 python_compile_all() {
33         use doc && emake -C doc html
34 }
35
36 src_test() {
37         # Tests are a bit fragile to failures in parallel.
38         local DISTUTILS_NO_PARALLEL_BUILD=1
39         distutils-r1_src_test
40 }
41
42 python_test() {
43         # Re-enable in order to properly test disabling it ;).
44         # https://bitbucket.org/hpk42/execnet/issue/10
45         unset PYTHONDONTWRITEBYTECODE
46
47         # https://bitbucket.org/hpk42/execnet/issue/35/test-failures-in-execnet-120
48         py.test || die "Tests fail with ${EPYTHON}"
49 }
50
51 python_install_all() {
52         use doc && local HTML_DOCS=( doc/_build/html/. )
53
54         distutils-r1_python_install_all
55 }