# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-retrying
pkgver=1.3.4
pkgrel=0
pkgdesc="General purpose Python3 retrying library"
url="https://github.com/groodt/retrying"
arch="noarch"
license="Apache-2.0"
depends="py3-six"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/groodt/retrying/archive/v$pkgver.tar.gz"
builddir="$srcdir/retrying-$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
}

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

sha512sums="
80bd19eefdbd8277ec0ba656d1b1d3589b2e3492cbb902c963376b3df475abbe4725c9902426a1784e4dddbd57ea8bc51ea5925a0a72a6f5c11333893314f2c5  py3-retrying-1.3.4.tar.gz
"
