blob: 75956d8f933fea72d7d45a149430e0ebf0df35ca (
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
|
# Maintainer: Konstantin Gizdov <arch at kge dot pw>
pkgbase=python-root_numpy
_pkgbase=root_numpy
pkgname=('python2-root_numpy' 'python-root_numpy')
pkgver=4.7.3
pkgrel=2
pkgdesc="The interface between ROOT and NumPy"
arch=('i686' 'x86_64')
url="http://scikit-hep.org/root_numpy/"
license=('BSD')
makedepends=('python2-setuptools' 'python-setuptools' 'cython2' 'cython'
'python2-numpy' 'python-numpy' 'root')
options=(!emptydirs)
source=("https://github.com/scikit-hep/${_pkgbase}/archive/${pkgver}.zip")
sha256sums=('62f467ffad6608566c943b8dffea212e12caccc96155e81ba451a1034adf1f33')
prepare() {
cd "${srcdir}"
cp -a "root_numpy-${pkgver}" "root_numpy-py2-${pkgver}"
cd "root_numpy-py2-${pkgver}"
msg2 "Adjusting Python 2 shebangs..."
find . -name '*.py' -type f -exec \
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i '{}' \; -print
}
build() {
msg2 "Building Python2"
cd "${srcdir}/root_numpy-py2-${pkgver}"
python2 setup.py build
msg2 "Building Python3"
cd "${srcdir}/root_numpy-${pkgver}"
python setup.py build
}
package_python2-root_numpy() {
depends=('python2-numpy' 'root')
cd "${srcdir}/root_numpy-py2-${pkgver}"
python2 setup.py install --root="${pkgdir}/" --optimize=1
install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -d "${pkgdir}/usr/share/doc/${pkgname}"
cp -r benchmarks "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r examples "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r paper "${pkgdir}/usr/share/doc/${pkgname}/"
}
package_python-root_numpy() {
depends=('python-numpy' 'root')
cd "${srcdir}/root_numpy-${pkgver}"
python setup.py install --root="${pkgdir}/" --optimize=1
install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -d "${pkgdir}/usr/share/doc/${pkgname}"
cp -r benchmarks "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r examples "${pkgdir}/usr/share/doc/${pkgname}/"
cp -r paper "${pkgdir}/usr/share/doc/${pkgname}/"
}
|