# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-mizani
pkgver=0.13.0
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="
2cfa518ad0664e0bcd0f2c98dcbf6e056c4daec6f9ef425a8a1ba288d380685d9665563739527945e9a35a5b6d43dd600192a11420a27c23d95f779777559c2d  mizani-0.13.0.tar.gz
"
