# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-alive-progress
pkgver=3.2.0
pkgrel=0
pkgdesc="A new kind of Progress Bar, with real-time throughput"
url="https://github.com/rsalmei/alive-progress"
arch="noarch"
license="MIT"
depends="python3 py3-about-time py3-grapheme"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-click py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver-2.tar.gz::https://github.com/rsalmei/alive-progress/archive/v$pkgver.tar.gz"
builddir="$srcdir/alive-progress-$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="
b7b3840e4e282bb95f85cf054abc0eff49364872ea9655585941b5e69e555ea516b39fbbe737c66ba65246ef5f1e3cfb1da3191500cb22540ccd66af67fb0e8f  py3-alive-progress-3.2.0-2.tar.gz
"
