# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-pcbnewtransition
pkgver=0.4.2
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
}

sha512sums="
76b91d5d0c54b94ba6b6e1a2d1ad9965d6f2745b4f0d2c40c27924a33b8d64c0d27149ab4b6b373c6a6373802dbefe80eff804f94076ab9566960a95bea5535a  py3-pcbnewtransition-0.4.2.tar.gz
"
