# Maintainer: Blair Bonnett pkgname=python-numpy-quaternion pkgver=2021.3.17.16.51.43 pkgrel=1 pkgdesc="Add built-in support for quaternions to NumPy" url="https://quaternion.readthedocs.io/" arch=('x86_64') license=('MIT') depends=('python-numpy' 'python-scipy') optdepends=( "python-numba: speedup of numerical functions" ) makedepends=('python-setuptools') checkdepends=('python-pytest' 'python-pytest-cov') source=( "https://files.pythonhosted.org/packages/source/n/numpy-quaternion/numpy-quaternion-$pkgver.tar.gz" ) sha256sums=( '5548b10556b22115fcd6b2979d4abb1aa448e1ad63e1cae10c30f41576ef163c' ) build() { cd "numpy-quaternion-$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" PYTHONDONTWRITEBYTECODE=1 pytest --no-cov } package() { cd "numpy-quaternion-$pkgver" python setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 --skip-build install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }