# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-autopage
pkgver=0.5.2
pkgrel=1
pkgdesc="A library to provide automatic paging for console output"
url="https://github.com/zaneb/autopage"
arch="noarch"
license="Apache-2.0"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-fixtures
	py3-pytest
	py3-testtools
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/a/autopage/autopage-$pkgver.tar.gz"
builddir="$srcdir/autopage-$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 --deselect autopage/tests/test_end_to_end.py
}

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

sha512sums="
a5449fc2a1011a3936c69784803e9f65a603cfa6df2335b095b029051fc26742109141ef2eb201f567334c0617433f29477efc43d98357d7ee00f266c6546560  autopage-0.5.2.tar.gz
"
