# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-toposort
pkgver=1.10
pkgrel=3
pkgdesc="Topological sorting for python"
url="https://gitlab.com/ericvsmith/toposort"
arch="noarch"
license="Apache-2.0"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://gitlab.com/ericvsmith/toposort/-/archive/$pkgver/toposort-$pkgver.tar.bz2"
builddir="$srcdir/toposort-$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 test.test_toposort
}

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

sha512sums="
a1bf41e7324b56eaf914e6b89f0ec5e18c6661d8d31b429e169086c71d1060b6aa0e29cc048fe971455b5b43e500a1d74fea0168c4c869cdab09206ba3f9c50f  toposort-1.10.tar.bz2
"
