# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-typer
pkgver=0.12.5
pkgrel=0
pkgdesc="Building CLI applications"
url="https://github.com/tiangolo/typer"
arch="noarch"
license="MIT"
depends="python3 py3-click py3-typing-extensions"
checkdepends="py3-pytest-xdist py3-pytest-cov py3-pytest-sugar py3-rich  py3-shellingham"
makedepends="py3-gpep517 py3-pdm-backend"
subpackages="$pkgname-pyc"
source="https://github.com/tiangolo/typer/archive/$pkgver/typer-$pkgver.tar.gz"
builddir="$srcdir/typer-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH=src \
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k 'not test_completion and not test_tutorial'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/typer-$pkgver-py3-none-any.whl
}

sha512sums="
d35cf0bc02fea81f8dbcf44fba9248bf94d6693d7792d76ae1baee59d662cad3fe3917ff4630e37a76270db64373964863a42c4187b4a4a89963425aa5575226  typer-0.12.5.tar.gz
"
