# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-mizani
pkgver=0.13.5
pkgrel=0
pkgdesc="A scales package for python"
url="https://github.com/has2k1/mizani"
arch="noarch"
license="MIT"
depends="
	python3
	py3-numpy
	py3-scipy
	py3-pandas
	py3-matplotlib
	py3-palettable
	py3-tzdata
	"
checkdepends="py3-pytest-xdist py3-pytest-cov"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/has2k1/mizani/archive/v$pkgver/mizani-$pkgver.tar.gz"
builddir="$srcdir/mizani-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	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 breaks and not test_bounds'
}

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

sha512sums="
7f2717c756ed849d68fb781a70c879a42cb3879f1a359355fcab6248c6418754a8acf9e1ab072a5b05638094f950264dad96591147e9f00e3f7b851be0b92b55  mizani-0.13.5.tar.gz
"
