*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / patsy / patsy-0.4.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python module to describe statistical models and design matrices"
11 HOMEPAGE="http://patsy.readthedocs.org/en/latest/index.html"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
17 IUSE="doc test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/numpy[${PYTHON_USEDEP}]
22         dev-python/six[${PYTHON_USEDEP}]
23         "
24 DEPEND="${RDEPEND}
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         sci-libs/scipy[${PYTHON_USEDEP}]
27         doc? (
28                 dev-python/ipython[${PYTHON_USEDEP}]
29                 dev-python/matplotlib[${PYTHON_USEDEP}]
30                 dev-python/sphinx[${PYTHON_USEDEP}]
31                 dev-python/pandas[${PYTHON_USEDEP}]
32                 )
33         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
34
35 python_compile_all() {
36         use doc && emake -C doc html
37 }
38
39 python_test() {
40         cd "${BUILD_DIR}" || die
41         nosetests -v || die "Testing failed with ${EPYTHON}"
42 }
43
44 python_install_all() {
45         use doc && HTML_DOCS=( doc/_build/html/. )
46         distutils-r1_python_install_all
47 }