# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-boltons
pkgver=23.1.1
pkgrel=1
pkgdesc="Bolted-on functionality for python3"
url="https://github.com/mahmoud/boltons"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest-xdist py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver-2.tar.gz::https://github.com/mahmoud/boltons/archive/$pkgver.tar.gz"
builddir="$srcdir/boltons-$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 -n auto
}

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

sha512sums="
ab7279459312bc4ce3f9c9d9acb11593718c4a71074c29a8afb8eb20c1266645bd21187e56d7c655719d4b8348f234a04d163bcc5e35ee719ba5077efd077fb3  py3-boltons-23.1.1-2.tar.gz
"
