# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-inquirer
pkgver=3.2.5
pkgrel=0
pkgdesc="collection of common interactive command line user interfaces"
url="https://github.com/magmax/python-inquirer"
arch="noarch"
license="MIT"
depends="python3 py3-blessed py3-readchar py3-python-editor"
makedepends="py3-poetry-core py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-flake8 py3-pexpect py3-pytest py3-pytest-cov py3-pytest-xdist
	py3-mock py3-nosexcover py3-coveralls py3-wheel ncurses-terminfo"
# GH tarballs required for tests!
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/magmax/python-inquirer/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-inquirer-$pkgver"

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

check() {
	TERM=xterm-256color PYTHONPATH=src pytest
}

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

sha512sums="
be0b9b3b55e0e3307f068b99e6b389ed9db32df535967f686e7f038d90fa33665b6c041d9952a5c35f677705402dc55bcf0e56ab4b0c072665a6e0e08ec27c73  py3-inquirer-3.2.5.tar.gz
"
