# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-bayeso
pkgver=0.6.0
pkgrel=1
pkgdesc="A Bayesian optimization framework"
url="https://bayeso.org"
arch="noarch !riscv64" # timeouts
license="MIT"
depends="python3 py3-cma py3-numpy py3-scipy py3-tqdm"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist py3-pytest-benchmark py3-pytest-timeout"
subpackages="$pkgname-pyc"
source="https://github.com/jungtaekkim/bayeso/archive/v$pkgver/bayeso-$pkgver.tar.gz"
builddir="$srcdir/bayeso-$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 tests/common -n auto --ignore=tests/integration_test.py
}

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

sha512sums="
3a0b24104f79a1ea77da3a0065eba8124cd4f54c5b717acd1b7b1e77da5f784f8156bf9a1756ea4489d07bfbb480fb0cbc982e2abc620d53f361b2047fd23dc4  bayeso-0.6.0.tar.gz
"
