*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sci-visualization / yt / yt-3.4.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_6} )
7
8 inherit distutils-r1 flag-o-matic
9
10 DESCRIPTION="Astrophysical Simulation Analysis and Vizualization package"
11 HOMEPAGE="http://yt-project.org/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="hub test"
18 RESTRICT="!test? ( test )"
19
20 CDEPEND=">=dev-python/numpy-1.10.4[${PYTHON_USEDEP}]"
21 RDEPEND="${CDEPEND}
22         dev-python/h5py[${PYTHON_USEDEP}]
23         dev-python/matplotlib[${PYTHON_USEDEP}]
24         >=dev-python/sympy-1.0[${PYTHON_USEDEP}]
25         hub? ( dev-python/girder-client[${PYTHON_USEDEP}] )
26 "
27 DEPEND="${CDEPEND}
28         >=dev-python/cython-0.24[${PYTHON_USEDEP}]
29         >=dev-python/setuptools-20.0[${PYTHON_USEDEP}]
30         test? ( ${RDEPEND}
31                 dev-python/nose[${PYTHON_USEDEP}]
32         )"
33
34 python_prepare_all() {
35         append-flags -fno-strict-aliasing
36         distutils-r1_python_prepare_all
37 }
38
39 python_test() {
40         pushd "${BUILD_DIR}"/lib >/dev/null || die
41         nosetests -sv --exclude=test_flake8 || die "Tests fail with ${EPYTHON} ${PWD}"
42         popd >/dev/null || die
43 }