# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-fontmath
pkgver=0.9.4
pkgrel=0
pkgdesc="set of objects for performing math operations on font data"
url="https://github.com/robotools/fontMath"
arch="noarch"
license="MIT"
depends="py3-fonttools python3"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/robotools/fontMath/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/fontMath-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

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

sha512sums="
bd76c4ee80ac56add4b0d1adc4dcb844e6bf78c0610fd98e54adf1b3aab7690ff72530f9c7adadcc3764ae1188162291e02e0dec5314bbdf0add217238cdea19  py3-fontmath-0.9.4.tar.gz
"
