# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-kiwisolver
_pkgname=kiwisolver
pkgver=1.4.5
pkgrel=1
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="
889e106c27915cb773bc13969605812c1ca01a139e992d2b3517eb20989ae41392bfdcdd63184a7777b13eff5109d167869087ea09149b1527e56a3455213b14  py3-kiwisolver-1.4.5.tar.gz
"
