summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlair Bonnett2019-10-01 19:21:07 +0200
committerBlair Bonnett2019-10-01 19:21:07 +0200
commit4e30e5929bf024ad7e449e6d44604d44650006dd (patch)
treedd4739060326c94e25fe673b9d611d8a7465ac0b
parentc74c76674bd83ac8ab07167ab3ed91191ef63f93 (diff)
downloadaur-4e30e5929bf024ad7e449e6d44604d44650006dd.tar.gz
Update to 2019.9.30.17.47.33
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD21
-rw-r--r--fix-tests.patch40
3 files changed, 13 insertions, 62 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 231e140b90a5..665679946370 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,17 @@
pkgbase = python-numpy-quaternion
pkgdesc = Add built-in support for quaternions to NumPy
- pkgver = 2019.7.23.15.26.49
- pkgrel = 4
- url = https://github.com/moble/quaternion
+ pkgver = 2019.9.30.17.47.33
+ pkgrel = 1
+ url = https://quaternion.readthedocs.io/
arch = x86_64
license = MIT
checkdepends = python-pytest
makedepends = python-setuptools
- depends = python-numpy>=1.13
+ depends = python-numpy
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
- source = fix-tests.patch
- sha256sums = 42289bafc3292959173d93736f9c875b5c69d472934f04a76883b7b185adc42e
- sha256sums = 6418231f9ab5e3bc2fe419b65feff18f694cf877c1e744f011bde83250eda655
+ source = https://files.pythonhosted.org/packages/source/n/numpy-quaternion/numpy-quaternion-2019.9.30.17.47.33.tar.gz
+ sha256sums = 4ebc8e419aff57e6146baadc7c8309e2f3558d9f2c36c62a4813bf9905f59279
pkgname = python-numpy-quaternion
diff --git a/PKGBUILD b/PKGBUILD
index ebf3200bbb92..f7e0e08283ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Blair Bonnett <blair dot bonnett at gmail dot com>
pkgname=python-numpy-quaternion
-pkgver=2019.7.23.15.26.49
-pkgrel=4
+pkgver=2019.9.30.17.47.33
+pkgrel=1
pkgdesc="Add built-in support for quaternions to NumPy"
-url="https://github.com/moble/quaternion"
+url="https://quaternion.readthedocs.io/"
arch=('x86_64')
license=('MIT')
-depends=('python-numpy>=1.13' 'python-scipy')
+depends=('python-numpy' 'python-scipy')
optdepends=(
"python-numba: speedup of numerical functions"
)
@@ -15,18 +15,11 @@ makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(
"https://files.pythonhosted.org/packages/source/n/numpy-quaternion/numpy-quaternion-$pkgver.tar.gz"
- "fix-tests.patch"
)
sha256sums=(
- '42289bafc3292959173d93736f9c875b5c69d472934f04a76883b7b185adc42e'
- '6418231f9ab5e3bc2fe419b65feff18f694cf877c1e744f011bde83250eda655'
+ '4ebc8e419aff57e6146baadc7c8309e2f3558d9f2c36c62a4813bf9905f59279'
)
-prepare() {
- cd "numpy-quaternion-$pkgver"
- patch --forward --strip=1 --input="$srcdir/fix-tests.patch"
-}
-
build() {
cd "numpy-quaternion-$pkgver"
package_version="$pkgver" python setup.py build
@@ -35,11 +28,11 @@ 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
+ PYTHONPATH="$PWD/build/lib.linux-$CARCH-$PYVER" PYTHONDONTWRITEBYTECODE=1 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/" --prefix=/usr --optimize=1 --skip-build
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/fix-tests.patch b/fix-tests.patch
deleted file mode 100644
index aa2367117b87..000000000000
--- a/fix-tests.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-test_quaternion_absolute() and test_quaternion_norm(): use np.allclose
-for comparison to avoid failing with a small floating-point error.
-
-test_as_spherical_coords(): the input values for varphi are on [0, 2pi]
-but the returned values are calculated with np.arctan2 and are on [-pi,
-pi]. Add 2*pi to negative return values to allow comparison.
----
- test/test_quaternion.py | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/test/test_quaternion.py b/test/test_quaternion.py
-index 0aaea58..26a58bb 100644
---- a/test/test_quaternion.py
-+++ b/test/test_quaternion.py
-@@ -425,6 +425,7 @@ def test_as_spherical_coords(Rs):
- for i in range(5000)]
- for vartheta, varphi in random_angles:
- vartheta2, varphi2 = quaternion.as_spherical_coords(quaternion.from_spherical_coords(vartheta, varphi))
-+ varphi2 = (varphi2 + 2*np.pi) if varphi2 < 0 else varphi2
- assert abs(vartheta - vartheta2) < 1e-12, ((vartheta, varphi), (vartheta2, varphi2))
- assert abs(varphi - varphi2) < 1e-12, ((vartheta, varphi), (vartheta2, varphi2))
- # Now test that arbitrary rotors rotate z to the appropriate location
-@@ -582,7 +583,7 @@ def test_quaternion_absolute(Qs):
- for q, a in [(Qs[q_0], 0.0), (Qs[q_1], 1.0), (Qs[x], 1.0), (Qs[y], 1.0), (Qs[z], 1.0),
- (Qs[Q], np.sqrt(Qs[Q].w ** 2 + Qs[Q].x ** 2 + Qs[Q].y ** 2 + Qs[Q].z ** 2)),
- (Qs[Qbar], np.sqrt(Qs[Q].w ** 2 + Qs[Q].x ** 2 + Qs[Q].y ** 2 + Qs[Q].z ** 2))]:
-- assert q.abs() == a
-+ assert np.allclose(q.abs(), a)
-
-
- def test_quaternion_norm(Qs):
-@@ -596,7 +597,7 @@ def test_quaternion_norm(Qs):
- for q, a in [(Qs[q_0], 0.0), (Qs[q_1], 1.0), (Qs[x], 1.0), (Qs[y], 1.0), (Qs[z], 1.0),
- (Qs[Q], Qs[Q].w ** 2 + Qs[Q].x ** 2 + Qs[Q].y ** 2 + Qs[Q].z ** 2),
- (Qs[Qbar], Qs[Q].w ** 2 + Qs[Q].x ** 2 + Qs[Q].y ** 2 + Qs[Q].z ** 2)]:
-- assert q.norm() == a
-+ assert np.allclose(q.norm(), a)
-
-
- # Unary quaternion returners