# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-ternary
_pkgorig=python-ternary
pkgver=1.0.8
pkgrel=3
pkgdesc="Make ternary plots in python with matplotlib"
url="https://github.com/marcharper/python-ternary"
arch="noarch"
license="MIT"
depends="
	python3
	py3-matplotlib
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/python-ternary/python-ternary-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$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
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
11f2376ac41c264ef1441a0a6536131f02ea295abbeadcda6f33d784beff31ac3a3f1b3fbba9082e1d25e0f07c4de05fa68caeb60b6a11781af3c02cd86d78b0  py3-ternary-1.0.8.tar.gz
"
