# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-imucal
_pkgorig=imucal
pkgver=2.6.0
pkgrel=0
pkgdesc="A Python library to calibrate 6 DOF IMUs"
url="https://github.com/mad-lab-fau/imucal"
arch="noarch !armhf !armv7 !x86" # py3-matplotlib #assertion errors
license="MIT"
depends="
	python3
	py3-h5py
	py3-matplotlib
	py3-numpy
	py3-pandas
	py3-packaging
	py3-typing-extensions
	"
checkdepends="py3-pytest-xdist"
makedepends="py3-poetry-core py3-gpep517"
subpackages="$pkgname-pyc"
source="https://github.com/mad-lab-fau/imucal/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/imucal-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k "not test_find_closest_warning" --ignore=tests/test_examples.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/imucal-$pkgver-py3-none-any.whl
}

sha512sums="
d724db39696bf9e84988c842b16f5e76c84cc7fe1052127caa1ed98eed254be8bde122d089b8b16a483de10b73b6cca3870fc2af1ed61b0e8e90746407a4a1cc  imucal-2.6.0.tar.gz
"
