blob: 0002318b8e175db25ece5145b499b4f7fd2de435 (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# Maintainer: xia0er <xia0er@gmail.com>
# Contributor: Xyne <xyne@archlinux.ca>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: Angel "angvp" Velasquez <angvp[at]archlinux.com.ve>
pkgbase=python-numpy-openblas
#pkgname=("python2-numpy-openblas" "python-numpy-openblas")
pkgname=python-numpy-openblas
pkgver=1.10.1
pkgrel=1
pkgdesc="Scientific tools for Python - built with openblas"
arch=("i686" "x86_64")
license=("custom")
url="http://numpy.scipy.org/"
source=("python-numpy-$pkgver.tar.gz::https://github.com/numpy/numpy/archive/v$pkgver.tar.gz")
md5sums=('d2a125a52187ab234bfe444287b53660')
prepare() {
cp -a numpy{,-py2}-$pkgver
cd numpy-py2-$pkgver
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 $(find . -name '*.py')
}
package_python2-numpy-openblas() {
depends=("python2" "cython2" "openblas-lapack")
options=('staticlibs')
makedepends=("python2-distribute" "gcc-fortran" "python2-nose")
optdepends=("python2-nose: testsuite")
provides=("python2-numpy=${pkgver}")
conflicts=("python2-numpy")
_pyver=2.7
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python2"
cd "${srcdir}"/numpy-py2-"$pkgver"
#python2 setup.py config_fc --fcompiler=gnu95 config
python2 setup.py config_fc --fcompiler=gnu95 build
python2 setup.py config_fc --fcompiler=gnu95 install \
--prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/"
install -m755 -d "${pkgdir}/usr/include/python${_pyver}"
ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy"
}
package_python-numpy-openblas() {
depends=("python" "cython" "openblas-lapack")
options=('staticlibs')
makedepends=("python-distribute" "gcc-fortran" "python-nose")
optdepends=("python-nose: testsuite")
provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}")
conflicts=("python3-numpy" "python-numpy")
_pyver=3.5
_pyinc=3.5m
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python3"
cd "$srcdir/numpy-$pkgver"
#python setup.py config_fc --fcompiler=gnu95 config
python setup.py config_fc --fcompiler=gnu95 build
python setup.py config_fc --fcompiler=gnu95 install \
--prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/"
install -m755 -d "${pkgdir}/usr/include/python${_pyinc}"
ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyinc}/numpy"
}
|