# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-urlman
pkgver=2.0.2
pkgrel=0
pkgdesc="Django URL pattern helpers"
url="https://pypi.org/project/urlman/"
arch="noarch"
license="Apache-2.0"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-django-rest-framework
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="https://github.com/andrewgodwin/urlman/archive/$pkgver/py3-urlman-$pkgver.tar.gz"
builddir="$srcdir/urlman-$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="
87e43bbbd6a83e72c0761ee2ea8710ddd70f137b1691ae6226538b7c46942b8fc4c3e40ae93a10c1c87727516caa46f64b59c1d9a703445a07e50871adf63bfe  py3-urlman-2.0.2.tar.gz
"
