maintainer="Bart Ribbers <bribbers@disroot.org>"
pkgname=py3-cliff
pkgver=4.8.0
pkgrel=0
pkgdesc="Command Line Interface Formulation Framework"
url="https://docs.openstack.org/cliff/latest/"
arch="noarch"
license="Apache-2.0"
depends="
	py3-importlib-metadata
	py3-stevedore
	py3-yaml
	"
makedepends="
	py3-gpep517
	py3-pbr
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-autopage
	py3-cmd2
	py3-docutils
	py3-pytest
	py3-prettytable
	py3-stevedore
	py3-testtools
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/c/cliff/cliff-$pkgver.tar.gz"
options="!check" # Requires specific (old) version of py3-cmd2
builddir="$srcdir/cliff-$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
}

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

sha512sums="
226b1f29adbe941b5c281db4bd37d0e2b195f1126b2944dd79c8766cb85deec79eaeb1b511d0964b7426fa02ef952e65e1e48c16d7566e24e4aaa8509f6e5cfd  cliff-4.8.0.tar.gz
"
