summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlair Bonnett2019-09-28 22:06:59 +0200
committerBlair Bonnett2019-09-28 22:06:59 +0200
commit9dc5e55c5fe50c24c8766b8ab6d53c6c36294aa4 (patch)
tree6ed453d2068e019875026874fb0886c1a44f1308
parent7a95dc0cfdce6ede726768b0416870eed7bfc167 (diff)
downloadaur-9dc5e55c5fe50c24c8766b8ab6d53c6c36294aa4.tar.gz
Fix dependencies, enable tests, quote variables.
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD19
3 files changed, 22 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6c62f3faa6f1..730ae25e474c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,15 @@
pkgbase = python-numpy-quaternion
pkgdesc = Add built-in support for quaternions to NumPy
pkgver = 2019.7.23.15.26.49
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/moble/quaternion
arch = x86_64
license = MIT
- depends = python-numpy>=1.3
+ checkdepends = python-pytest
+ makedepends = python-setuptools
+ depends = python-numpy>=1.13
+ depends = python-scipy
+ optdepends = python-numba: speedup of numerical functions
source = https://files.pythonhosted.org/packages/source/n/numpy-quaternion/numpy-quaternion-2019.7.23.15.26.49.tar.gz
sha256sums = 42289bafc3292959173d93736f9c875b5c69d472934f04a76883b7b185adc42e
diff --git a/.gitignore b/.gitignore
index dbf3fdd9285b..bcb56b4bd3e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ src
pkg
*.pkg.tar.xz
*.tar.gz
+*.log
diff --git a/PKGBUILD b/PKGBUILD
index 1bd6921c9e73..2f05c103cd24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,17 @@
pkgname=python-numpy-quaternion
pkgver=2019.7.23.15.26.49
-pkgrel=2
+pkgrel=3
pkgdesc="Add built-in support for quaternions to NumPy"
url="https://github.com/moble/quaternion"
arch=('x86_64')
license=('MIT')
-depends=('python-numpy>=1.3')
+depends=('python-numpy>=1.13' 'python-scipy')
+optdepends=(
+ "python-numba: speedup of numerical functions"
+)
+makedepends=('python-setuptools')
+checkdepends=('python-pytest')
source=(
"https://files.pythonhosted.org/packages/source/n/numpy-quaternion/numpy-quaternion-$pkgver.tar.gz"
)
@@ -17,11 +22,17 @@ sha256sums=(
build() {
cd "numpy-quaternion-$pkgver"
- package_version=${pkgver} python setup.py build
+ package_version="$pkgver" python setup.py build
+}
+
+check() {
+ cd "numpy-quaternion-$pkgver"
+ PYVER=$(python -c 'import sys; print("{}.{}".format(*sys.version_info[:2]))')
+ PYTHONPATH="$PWD/build/lib.linux-$CARCH-$PYVER" pytest
}
package() {
cd "numpy-quaternion-$pkgver"
- package_version=${pkgver} python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ package_version="$pkgver" python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}