# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-kiwisolver
_pkgname=kiwisolver
pkgver=1.4.6
pkgrel=0
pkgdesc="Efficient implementation of the Cassowary constraint solving algorithm"
url="https://github.com/nucleic/kiwi"
arch="all"
license="BSD-3-Clause-Attribution"
depends="python3"
makedepends="python3-dev py3-setuptools py3-cppy py3-setuptools_scm"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/nucleic/kiwi/archive/$pkgver.tar.gz"
builddir="$srcdir"/kiwi-$pkgver

replaces="py-kiwisolver" # Backwards compatibility
provides="py-kiwisolver=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo build/lib.*-3*)" pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
ac4fabf1256ee96614461e201c1da579b62403b82dd7f44d9b05b2d43c5faba9787e2bb3dcee6fb59b5f8fb32fc72ac50489ac4a42d08fdfc3e94687a0328580  py3-kiwisolver-1.4.6.tar.gz
"
