# Maintainer:
pkgname=py3-beniget
pkgver=0.4.2
pkgrel=0
pkgdesc="Extract semantic information about static Python code"
url="https://github.com/serge-sans-paille/beniget"
arch="noarch"
license="BSD-3-Clause"
depends="py3-gast"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/serge-sans-paille/beniget/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/beniget-$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="
24a6bef4fa06cf5322c4f8b60a3685d3f9e6f095b2412d08bd04fd633bbb6bacaf8881194c4c2247da0a0fd969500dcd852d05fa2554fdc92a6fbda8a647e08e  py3-beniget-0.4.2.tar.gz
"
