# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-opytimark
_pkgorig=opytimark
pkgver=1.0.8
pkgrel=4
pkgdesc="Opytimark is a Python library consisting of optimization benchmarking functions"
url="https://github.com/gugarosa/opytimark"
arch="noarch"
license="Apache-2.0"
depends="
	python3
	py3-numpy
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/gugarosa/opytimark/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 -k 'not test_year and not test_decorator and not test_loader and not cec_benchmark'
}

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

sha512sums="
e5bf9e79631a40a1189af4a1104f4ae970560da2bd915506217ea704fd1786a56a86acd24b67ab5ba463948bc4171128e233d0af6045cbceb43a93b1a91068ea  opytimark-1.0.8.tar.gz
"
