# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-pcbnewtransition
pkgver=0.5.0
pkgrel=0
pkgdesc="Easily support KiCAD 7, 6 and 5 in your KiCAD plugins by monkeypatching older versions to KiCAD 7 API"
url="https://github.com/yaqwsx/pcbnewTransition"
# riscv64: py3-shapely
# aarch64, armv7, armhf: py3-solidpython
# s390x: kicad
arch="noarch !riscv64 !aarch64 !armv7 !armhf !s390x"
license="MIT"
depends="
	kicad
	python3
	"
makedepends="
	py3-gpep517
	py3-python-versioneer
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/yaqwsx/pcbnewTransition/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pcbnewTransition-$pkgver"
options="!check" # no tests in the repo

prepare() {
	default_prepare

	# unvendor old versioneer
	rm -f versioneer.py
}

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

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

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
3fb8dd3864aeebb07f65d17815cc8dca32945bcf1277588f9f2251bf17f8bb36a31eede902de96796b3e933c4ccb2e23ce12eceb546d0a2501f35f48233fbcba  py3-pcbnewtransition-0.5.0.tar.gz
"
