# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-inspyred
_pkgorig=inspyred
pkgver=1.0.3
pkgrel=0
pkgdesc="A framework for creating bio-inspired computational intelligence algorithms in Python"
url="https://github.com/aarongarrett/inspyred"
arch="noarch"
license="MIT"
depends="python3 py3-numpy py3-matplotlib py3-click"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/aarongarrett/inspyred/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$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="
6dceaf5a3e5e951e1f1d045949339bf5eec5ababacea27201d5b3675943b93519d640728cc913207f85b494223b9fa3840f428a733d044b926780735eb9333d7  inspyred-1.0.3.tar.gz
"
