*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sci-libs / scikits_image / scikits_image-0.13.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit distutils-r1 eutils virtualx
9
10 MYPN="${PN/scikits_/scikit-}"
11 MYP="${MYPN}-${PV}"
12
13 DESCRIPTION="Image processing routines for SciPy"
14 HOMEPAGE="https://scikit-image.org/"
15 SRC_URI="mirror://pypi/${PN:0:1}/${MYPN}/${MYP}.tar.gz"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20 IUSE="doc freeimage pyamg test"
21 RESTRICT="!test? ( test )"
22
23 RDEPEND="
24         dev-python/matplotlib[${PYTHON_USEDEP}]
25         dev-python/networkx[${PYTHON_USEDEP}]
26         dev-python/numpy[${PYTHON_USEDEP}]
27         dev-python/pillow[${PYTHON_USEDEP}]
28         dev-python/pywavelets[${PYTHON_USEDEP}]
29         dev-python/six[${PYTHON_USEDEP}]
30         sci-libs/scipy[sparse,${PYTHON_USEDEP}]
31         freeimage? ( media-libs/freeimage )
32         pyamg? ( dev-python/pyamg[${PYTHON_USEDEP}] )"
33 DEPEND="${RDEPEND}
34         >=dev-python/cython-0.23[${PYTHON_USEDEP}]
35         dev-python/setuptools[${PYTHON_USEDEP}]
36         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
37
38 S="${WORKDIR}/${MYP}"
39
40 DOCS=( CONTRIBUTORS.txt DEPENDS.txt RELEASE.txt TASKS.txt TODO.txt )
41
42 python_test() {
43         distutils_install_for_testing
44         cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
45         echo "backend : Agg" > matplotlibrc || die
46         #echo "backend.qt4 : PyQt4" >> matplotlibrc || die
47         #echo "backend.qt4 : PySide" >> matplotlibrc || die
48         MPLCONFIGDIR=. virtx nosetests --exe -v skimage
49 }
50
51 pkg_postinst() {
52         optfeature "FITS io capability" dev-python/astropy
53         optfeature "GTK" dev-python/pygtk
54         optfeature "Parallel computation" dev-python/dask
55         # not in portage yet
56         #optfeature "io plugin providing a wide variety of formats, including specialized formats using in medical imaging." dev-python/simpleitk
57         #optfeature "io plugin providing most standard formats" dev-python/imread
58 }