summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDylan Delgado2021-02-18 21:32:44 -0500
committerDylan Delgado2021-02-18 21:32:44 -0500
commit57d61110fbda40863f91cc147b5944c1184be6ca (patch)
treec73d727c6b7b9f68b62b0b132b7cacb9f453cef0 /PKGBUILD
downloadaur-57d61110fbda40863f91cc147b5944c1184be6ca.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6469b714e02d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+pkgname=python-numpy-git
+_pkgname=numpy
+pkgver=v1.21.0.dev0.r814.g740a8cf8c1
+pkgrel=1
+pkgdesc="Scientific tools for Python - git version"
+arch=('x86_64')
+license=('custom:BSD 3-clause')
+url="https://www.numpy.org/"
+depends=('cblas' 'lapack' 'python' 'openblas-lapack')
+optdepends=('python-nose: testsuite')
+makedepends=('python-setuptools' 'gcc-fortran' 'python-nose' 'cython')
+checkdepends=('python-pytest' 'python-hypothesis')
+conflicts=('python-numpy')
+provides=('python-numpy')
+options=('staticlibs')
+source=("git://github.com/numpy/numpy.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ # https://github.com/numpy/numpy/issues/17390
+ sed -i '/error/a \ ignore:Module already imported so cannot be rewritten' ${srcdir}/numpy/pytest.ini
+}
+
+build() {
+ cd ${srcdir}/numpy
+ python setup.py build
+}
+
+check() {
+ cd ${srcdir}/numpy
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ cd "$PWD/tmp_install"
+ PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python3.9/site-packages/:$PYTHONPATH" python -c 'import numpy; numpy.test()'
+}
+
+package() {
+ cd ${srcdir}/numpy
+ python setup.py 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/"
+} \ No newline at end of file