summaryrefslogtreecommitdiff
path: root/extra/python-numpy
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/python-numpy
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/python-numpy')
-rwxr-xr-xextra/python-numpy/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/extra/python-numpy/PKGBUILD b/extra/python-numpy/PKGBUILD
new file mode 100755
index 000000000..f7aaa3edf
--- /dev/null
+++ b/extra/python-numpy/PKGBUILD
@@ -0,0 +1,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/"
+}