# Maintainer: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
pkgname=py3-pyroma
_pkgname=pyroma
pkgver=4.2
pkgrel=0
pkgdesc="Rate your Python packages package friendliness"
url="https://pypi.org/project/pyroma/"
arch="noarch"
license="MIT"
depends="py3-build
	py3-docutils
	py3-pygments
	py3-requests
	py3-setuptools
	py3-trove-classifiers
	"
makedepends="py3-gpep517 py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/regebro/pyroma/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$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="
6b1830d171674409cc16894233768db065ad8d1c8ebe1edeb49575dc9df37f99b6d82096a19b9c5d6aaf23df94e62f5df86919a78acca4fe718926db73670e26  py3-pyroma-4.2.tar.gz
"
