blob: 7c489a4c5eefeb8b32e788bc4a5f05034ff516b7 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Contributor: Liam Timms <timms5000@gmail.com>
# Contributor: Frank Fishburn <frankthefishburn@gmail.com>
## Configuration
## Specify Matlab path (/opt/matlab/R* and /opt/spm12 will be auto-detected and latest one used if there are multiple)
#_MATLAB_DIR=
#_SPM_DIR=
pkgname=python-nipype
_name=${pkgname/python-/}
pkgver=1.9.2
pkgrel=1
pkgdesc='Neuroimaging in python pipelines and interfaces'
arch=('any')
url='https://github.com/nipy/nipype'
license=('Apache')
depends=('python-click' 'python-networkx' 'python-nibabel' 'python-numpy' 'python-packaging' 'python-prov' 'python-dateutil' 'python-scipy' 'python-simplejson' 'python-traits' 'python-filelock' 'python-etelemetry>=0.2.0' 'python-matplotlib' 'python-looseversion' 'python' 'python-setuptools' 'python-pandas')
makedepends=('python-numpydoc' 'python-sphinx' 'python-pytest' 'python-mock')
optdepends=('python-pybids' 'python-dipy' 'ants' '3dslicer' 'afni' 'freesurfer' 'fsl' 'spm12')
source=("${_name}-${pkgver}.tar.gz::https://github.com/nipy/${_name}/archive/${pkgver}.tar.gz")
sha256sums=('c484d6d1ba99d8c2e641bcd611614ed57c33c6cb33ff78bfbe3b2be4474a16fd')
_setpaths(){
# Try to auto-detect the matlab install directory
if [ -z "${_MATLAB_DIR}" ]; then
if [ -d "/opt/matlab" ]; then
MATLABCMD=$(find /opt/matlab/R*/bin -mindepth 2 -maxdepth 2 -name MATLAB | sort | tail -n 1 )
fi
else
MATLABCMD=$(find "${_MATLAB_DIR}"/bin -mindepth 2 -maxdepth 2 -name MATLAB | sort | tail -n 1 )
fi
if [ -z "${_SPM_DIR}" ]; then
if [ -e "/opt/spm12" ]; then
_SPM_DIR="/opt/spm12"
fi
fi
if [ ! -z "${_SPM_DIR}" ]; then
export MATLABCMD="${MATLABCMD} -sd ${_SPM_DIR}"
else
export MATLABCMD
fi
}
build() {
cd ${srcdir}/${_name}-${pkgver}
_setpaths
echo "MATLABCMD: ${MATLABCMD}"
python setup.py build
}
#check() {
#
# cd ${srcdir}/${_name}-${pkgver}
#
# _setpaths
# echo "MATLABCMD: ${MATLABCMD}"
#
# pytest -v --doctest-modules nipype
#}
package() {
cd $srcdir/${_name}-${pkgver}
python setup.py install --root="${pkgdir}/" --optimize=1
}
|