blob: 3b483638fec7fde81be3c9ffe2a13d3c90e51cce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Neuroimaging tools for Python"
HOMEPAGE="https://nipy.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RESTRICT="test"
# reported upstream: https://github.com/nipy/nipy/issues/493
RDEPEND="
dev-python/prov[${PYTHON_USEDEP}]
dev-python/scipy[${PYTHON_USEDEP}]
dev-python/sympy[${PYTHON_USEDEP}]
>=sci-libs/nibabel-1.2[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
"
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
"
python_prepare_all() {
distutils-r1_python_prepare_all
# bug #397605
[[ ${CHOST} == *-darwin* ]] \
&& append-ldflags -bundle "-undefined dynamic_lookup" \
|| append-ldflags -shared
# nipy uses the horrible numpy.distutils automagic
}
python_test() {
distutils-r1_install_for_testing
cp nipy/testing/*.nii.gz "${BUILD_DIR}/lib/nipy/testing/"
cp nipy/modalities/fmri/tests/*.{mat,npz,txt} "${BUILD_DIR}/lib/nipy/modalities/fmri/tests/"
cp nipy/algorithms/statistics/models/tests/test_data.bin "${BUILD_DIR}/lib/nipy/algorithms/statistics/models/tests"
cp nipy/labs/spatial_models/tests/some_blobs.nii "${BUILD_DIR}/lib/nipy/labs/spatial_models/tests/some_blobs.nii"
mkdir "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
cp nipy/algorithms/diagnostics/tests/data/tsdiff_results.mat "${BUILD_DIR}/lib/nipy/algorithms/diagnostics/tests/data/"
cd "${BUILD_DIR}" || die
echo "backend : agg" > matplotlibrc
nosetests || die
}
|