diff options
author | lmwang | 2019-02-05 09:56:28 -0800 |
---|---|---|
committer | lmwang | 2019-02-05 09:56:28 -0800 |
commit | 73fcfa19b021ebc70cdf4b52d76ea17a7378be51 (patch) | |
tree | e130cc58d6130da3e67a003f4fe9cf9a256dd0c4 | |
parent | 482994aa036ad9dd4dd728467ea17f2cc443a631 (diff) | |
download | aur-73fcfa19b021ebc70cdf4b52d76ea17a7378be51.tar.gz |
Converted PKGBUILD to use split packages
-rw-r--r-- | .SRCINFO | 32 | ||||
-rwxr-xr-x | PKGBUILD | 82 |
2 files changed, 96 insertions, 18 deletions
@@ -1,16 +1,31 @@ # Generated by mksrcinfo v8 -# Mon Feb 4 23:36:24 UTC 2019 +# Tue Feb 5 17:55:43 UTC 2019 pkgbase = python-numpy-openblas pkgdesc = Scientific tools for Python - built with openblas pkgver = 1.16.1 - pkgrel = 1 + pkgrel = 2 url = http://numpy.scipy.org/ arch = i686 arch = x86_64 license = custom - makedepends = python-distribute + checkdepends = python-pytest + checkdepends = python2-pytest + makedepends = cblas + makedepends = lapack + makedepends = python + makedepends = python2 + makedepends = python-setuptools + makedepends = python2-setuptools makedepends = gcc-fortran makedepends = python-nose + makedepends = python2-nose + makedepends = cython + makedepends = cython2 + options = staticlibs + source = python-numpy-1.16.1.tar.gz::https://github.com/numpy/numpy/archive/v1.16.1.tar.gz + sha256sums = 59485e2d172c4c3e27307969ef2c1220b98efcf59cbf373bec41da19f7b69b92 + +pkgname = python-numpy-openblas depends = python depends = cython depends = openblas-lapack @@ -19,9 +34,12 @@ pkgbase = python-numpy-openblas provides = python-numpy=1.16.1 conflicts = python3-numpy conflicts = python-numpy - options = staticlibs - source = python-numpy-1.16.1.tar.gz::https://github.com/numpy/numpy/archive/v1.16.1.tar.gz - sha256sums = 59485e2d172c4c3e27307969ef2c1220b98efcf59cbf373bec41da19f7b69b92 -pkgname = python-numpy-openblas +pkgname = python2-numpy-openblas + depends = python2 + depends = cython2 + depends = openblas-lapack + optdepends = python2-nose: testsuite + provides = python2-numpy=1.16.1 + conflicts = python2-numpy @@ -5,25 +5,86 @@ # Contributor: Angel "angvp" Velasquez <angvp[at]archlinux.com.ve> pkgbase=python-numpy-openblas -#pkgname=("python2-numpy-openblas" "python-numpy-openblas") -pkgname=python-numpy-openblas +pkgname=("python-numpy-openblas" "python2-numpy-openblas") pkgver=1.16.1 -pkgrel=1 +pkgrel=2 pkgdesc="Scientific tools for Python - built with openblas" arch=("i686" "x86_64") license=("custom") url="http://numpy.scipy.org/" +makedepends=('cblas' 'lapack' 'python' 'python2' 'python-setuptools' 'python2-setuptools' + 'gcc-fortran' 'python-nose' 'python2-nose' 'cython' 'cython2') +checkdepends=('python-pytest' 'python2-pytest') +options=('staticlibs') source=("python-numpy-$pkgver.tar.gz::https://github.com/numpy/numpy/archive/v$pkgver.tar.gz") sha256sums=('59485e2d172c4c3e27307969ef2c1220b98efcf59cbf373bec41da19f7b69b92') -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") +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 + python setup.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 + python setup.py config_fc --fcompiler=gnu95 install --root="$PWD/tmp_install" --optimize=1 + cd "$PWD/tmp_install" + PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python3.7/site-packages:$PYTHONPATH" python -c 'import numpy; numpy.test()' + + cd "$srcdir"/numpy-$pkgver-py2 + python2 setup.py config_fc --fcompiler=gnu95 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_python2-numpy-openblas() { + depends=("python2" "cython2" "openblas-lapack") + 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-"$pkgver"-py2 + + 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" + + mv "$pkgdir"/usr/bin/f2py{,2} +} + +package_python-numpy-openblas() { + depends=("python" "cython" "openblas-lapack") + optdepends=("python-nose: testsuite") + provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}") + conflicts=("python3-numpy" "python-numpy") -package() { _pyver=3.7 _pyinc=3.7m @@ -33,7 +94,6 @@ package() { 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 \ |