# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-aiohttp-retry
_pkgreal=aiohttp_retry
pkgver=2.9.1
pkgrel=0
pkgdesc="Simple retry client for aiohttp."
url="https://github.com/inyutin/aiohttp_retry"
arch="noarch"
license="MIT"
depends="
	py3-aiohttp
	py3-yarl
"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-aiohttp
	py3-pytest-cov
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/inyutin/aiohttp_retry/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 .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

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

sha512sums="
fb6a0f0c9dde5aa1aeb4a95f8f25b1c229ef9288fe82adddb8ef7482149c16fb83ea1f51b89ad6cd8ed7e9cd541e206a8e83b1529d49e14089ebf40794c60b28  py3-aiohttp-retry-2.9.1.tar.gz
"
