# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-leap_ec
pkgver=0.8.1
pkgrel=1
pkgdesc="A general purpose Library for Evolutionary Algorithms in Python"
url="https://github.com/AureumChaos/LEAP"
arch="noarch"
license="AFL-3.0"
depends="
	python3
	py3-dask
	py3-distributed
	py3-docopt
	py3-matplotlib
	py3-networkx
	py3-numpy
	py3-pandas
	py3-rich
	py3-scipy
	py3-toolz
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
subpackages="$pkgname-pyc"
source="https://github.com/AureumChaos/LEAP/archive/$pkgver/LEAP-$pkgver.tar.gz"
builddir="$srcdir/LEAP-$pkgver"
options="!check" # missing dependencies | skip for now

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="
6d3818f6792acbcad1dfaeb2d85db5924708277c4aadb5ccb6c12fa4b85c37555a133cb32f790c101b0c4addab9ae51d445c636441e6da40278e2db8e2c38d3a  LEAP-0.8.1.tar.gz
"
