# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-pytest-click
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=pytest-click
pkgver=1.1.0
pkgrel=0
pkgdesc="Pytest plugin for Click"
url="https://github.com/Stranger6667/pytest-click"
arch="noarch"
license="MIT"
depends="
	py3-click
	py3-pytest
"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Stranger6667/pytest-click/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$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 "$builddir"/.dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

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

sha512sums="
aed7a67477cc523789063c72b8da67ae09cfbade6d66d77a2dc098821648324b2d3caf8d187b5dcca2dbd013c2eaac173cb0a7ed8f4db0f69279cdaee4978ed6  py3-pytest-click-1.1.0.tar.gz
"
