# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-gast
pkgver=0.6.0
pkgrel=0
pkgdesc="Python AST that abstracts the underlying Python version"
url="https://github.com/serge-sans-paille/gast"
arch="noarch"
license="BSD-3-Clause"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/serge-sans-paille/gast/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/gast-$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 unittest discover
}

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

sha512sums="
ddbaba5c38c54956c0c5715a23d0855ececbc1c492d9306c3ac740fef003bd02f2ba004692d46c9bf4aeac98e864cd4418ad58150d98482b663f499c03ec2659  py3-gast-0.6.0.tar.gz
"
