# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-cmaes
_pkgorig=cmaes
pkgver=0.11.1
pkgrel=0
pkgdesc="Python library for CMA Evolution Strategy"
url="https://github.com/CyberAgentAILab/cmaes"
arch="noarch"
license="MIT"
depends="
	python3
	py3-numpy
	py3-scipy
	"
checkdepends="
	python3-dev
	py3-hypothesis
	py3-pytest
	py3-pytest-cov
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://github.com/CyberAgentAILab/cmaes/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/cmaes-$pkgver"

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

check() {
	python3 -m pytest -k 'not test_fuzzing'
}

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

sha512sums="
720605ad123662524ad72413b2481539c38e7fc1f5aa7ad50e64457b953f47369385e6887f8ae0990274c55e7b05fe735d62dae0decee823015c5e9f24e13054  cmaes-0.11.1.tar.gz
"
