mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
added extra/python2-numpy
This commit is contained in:
parent
cf3a5c8c92
commit
a017299348
1 changed files with 59 additions and 0 deletions
59
extra/python2-numpy/PKGBUILD
Normal file
59
extra/python2-numpy/PKGBUILD
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||||
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
||||
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
|
||||
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - standalone python2 variant until upstream fixes packages
|
||||
|
||||
pkgname='python2-numpy'
|
||||
pkgver=1.16.4
|
||||
pkgrel=1.1
|
||||
pkgdesc="Scientific tools for Python"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="https://www.numpy.org/"
|
||||
makedepends=('cblas' 'lapack' 'python2' 'python2-setuptools'
|
||||
'gcc-fortran' 'python2-nose' 'cython2')
|
||||
checkdepends=('python2-pytest')
|
||||
options=('staticlibs')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/numpy/numpy/archive/v$pkgver.tar.gz")
|
||||
sha512sums=('c8437e01a8c6c37787a8bf52f26d1adb273a6bb8f709f3cd92b427c63a1f772f9b2285b46321f2bd1a60a572797223d801aaed0fc2782bcdc7cbe39cd8c34c69')
|
||||
|
||||
prepare() {
|
||||
cp -a numpy-$pkgver{,-py2}
|
||||
cd numpy-$pkgver-py2
|
||||
|
||||
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')
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/numpy-$pkgver-py2
|
||||
python2 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
# TODO: Fix fortran tests here (it works fine after installation)
|
||||
|
||||
cd "$srcdir"/numpy-$pkgver-py2
|
||||
python2 setup.py install --root="$PWD/tmp_install" --optimize=1
|
||||
cd "$PWD/tmp_install"
|
||||
PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python2.7/site-packages:$PYTHONPATH" python2 -c 'import numpy; numpy.test()'
|
||||
}
|
||||
|
||||
package() {
|
||||
depends=('cblas' 'lapack' 'python2')
|
||||
optdepends=('python2-nose: testsuite'
|
||||
'openblas: faster linear algebra')
|
||||
|
||||
cd numpy-$pkgver-py2
|
||||
python2 setup.py 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/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/f2py{,2}
|
||||
}
|
Loading…
Reference in a new issue