# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-mealpy
pkgver=3.0.1
pkgrel=1
pkgdesc="Meta-Heuristic Algorithms using Python"
url="https://github.com/thieu1995/mealpy"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-numpy py3-matplotlib py3-opfunu py3-scipy"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/thieu1995/mealpy/archive/v$pkgver/mealpy-$pkgver.tar.gz"
builddir="$srcdir/mealpy-$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 -k "not test_HC"
}

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

sha512sums="
3b4ef56c7afd2d43d0bef544558439275aca14572b37ff22840705890615f10fa639a34ec1577a846df7f2a4ae7548a58898d85c175c49999a2fb7421050e0e6  mealpy-3.0.1.tar.gz
"
