blob: f7aaa3edf4213c3f358b70b4807e058c27e78d3a (
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
|
# $Id: PKGBUILD 110670 2011-02-21 12:18:28Z stephane $
# Maintainer: 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
pkgname=('python2-numpy' 'python3-numpy')
pkgver=1.5.1
pkgrel=2
pkgdesc="Scientific tools for Python"
arch=('i686' 'x86_64')
license=('custom')
url="http://numpy.scipy.org/"
makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose')
source=(http://downloads.sourceforge.net/numpy/numpy-${pkgver}.tar.gz)
md5sums=('376ef150df41b5353944ab742145352d')
build() {
cd "${srcdir}"
cp -a numpy-${pkgver} numpy-py2-${pkgver}
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python2"
cd "${srcdir}/numpy-py2-${pkgver}"
python2 setup.py config_fc --fcompiler=gnu95 build
echo "Building Python3"
cd "${srcdir}/numpy-${pkgver}"
python setup.py config_fc --fcompiler=gnu95 build
}
package_python2-numpy() {
depends=('lapack' 'python2')
provides=("python-numpy=${pkgver}")
replaces=('python-numpy')
conflicts=('python-numpy')
optdepends=('python-nose: testsuite')
cd "${srcdir}/numpy-py2-${pkgver}"
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/"
sed -i -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|" \
$(find ${pkgdir} -name '*.py')
}
package_python3-numpy() {
depends=('lapack' 'python')
cd "${srcdir}/numpy-${pkgver}"
python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/"
}
|