# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer:
pkgname=py3-lazy
pkgver=1.6
pkgrel=1
pkgdesc="Lazy attributes for Python objects"
url="https://github.com/stefanholek/lazy"
arch="noarch"
license="BSD-2-Clause"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/stefanholek/lazy/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/lazy-$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="
b6e89fdf33840c9f70f13129c4c43d5d21e72897a2ae6d8f5dcfe4145fca41492e76f83a1d4c1a26f90ac8cd9e4c88c9f55187ae4fa044ccb6ca640d8907c4dc  py3-lazy-1.6.tar.gz
"
