# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-aiounittest
_pkgreal=aiounittest
pkgver=1.5.0
pkgrel=0
pkgdesc="Test python asyncio-based code with ease"
url="https://github.com/kwarunek/aiounittest"
arch="noarch"
license="MIT"
depends="py3-wrapt"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-coverage
	py3-pytest
	py3-nose
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kwarunek/aiounittest/archive/refs/tags/$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 .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

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

sha512sums="
e17c5f939cff863de54a73c3aec3e5c80c037a53ee033ec8528665a6fe39bf004a2ce26a509c31e7bf6ba3e4abadb0ead908274147f010bbcd17b27c250f4ebf  py3-aiounittest-1.5.0.tar.gz
"
