# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-simpful
_pkgorig=simpful
pkgver=2.12.0
pkgrel=1
pkgdesc="A friendly python library for fuzzy logic reasoning"
url="https://github.com/aresio/simpful"
arch="noarch"
license="AFL-3.0"
depends="python3 py3-numpy py3-scipy"
checkdepends="py3-matplotlib py3-pytest-xdist"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/aresio/simpful/archive/$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/simpful-$pkgver"

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

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

sha512sums="
764a2f303430ed7385e949a54694f4def372cddbe35c1f13e0da1910daf376eb4c966ef9e15f65f1046199f20a6bfafdca0027604cb6233863196cce0524f66e  simpful-2.12.0.tar.gz
"
