dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / joblib / joblib-0.11.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Tools to provide lightweight pipelining in Python"
11 HOMEPAGE="https://pythonhosted.org/joblib/
12         https://github.com/joblib/joblib"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
18 IUSE="doc test"
19
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
23         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
24 RDEPEND=""
25
26 python_compile_all() {
27         if use doc; then
28                 sphinx-build -b html -c doc/ doc/ doc/html || die "docs failed installation"
29         fi
30 }
31
32 python_test() {
33         # https://github.com/joblib/joblib/issues/143
34         if [[ "${EPYTHON}" == pypy ]]; then
35                 sed -e 's:test_func_inspect_errors:_&:' -i ${PN}/test/test_func_inspect.py || die
36                 sed -e 's:test_parallel_pickling:_&:' -i ${PN}/test/test_parallel.py || die
37         fi
38
39         py.test -v
40 }
41
42 python_install_all() {
43         use doc && local HTML_DOCS=( doc/html/. )
44         distutils-r1_python_install_all
45 }