# Maintainer: John Anthony <john@jo.hnanthony.com>
pkgname=bootinfo
pkgver=0.1.0
pkgrel=4
pkgdesc="Bootloader info for ARM devices"
url="https://git.sr.ht/~martijnbraam/bootinfo"
arch="noarch"
license="GPL-3.0"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~martijnbraam/bootinfo/archive/$pkgver.tar.gz"
depends="python3"
makedepends="py3-setuptools python3-dev py3-gpep517"
checkdepends="py3-pytest"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest bootinfo
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
88723e0cd5d8e52b21badb47d1ccbd258934b473256092a919301492d2a45e2d2dc045a8ff98c92a26be1c03975b01767879b1d671e2fd63a135b7ec39924c44  bootinfo-0.1.0.tar.gz
"
