# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-landscapes
_pkgorig=landscapes
pkgver=0.0.12
pkgrel=4
pkgdesc="A dependency free library of standardized optimization test functions written in pure Python"
url="https://github.com/nathanrooy/landscapes"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/nathanrooy/landscapes/archive/$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
}

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

sha512sums="
8355bbebcb36cbf8e1e563c43067fa4aaf8bb75294077a596ff0228bff87e43d04e017ea92dd76311c93e678e3baaee0638db1576af675535c08e378d385d160  landscapes-0.0.12.tar.gz
"
