# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-simframe
_pkgorig=simframe
pkgver=1.0.5
pkgrel=0
pkgdesc="Python framework for setting up and running scientific simulations"
url="https://github.com/stammler/simframe/"
arch="noarch !armhf !armv7 !x86" #py3-h5py
license="BSD-3-Clause"
depends="python3 py3-dill py3-h5py py3-matplotlib py3-scipy py3-numpy"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-meson-python python3-dev"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/stammler/$_pkgorig/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 \
		--deselect tests/frame/test_group.py::test_group_memory_usage
}

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

	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/tests
}

sha512sums="
0c95c94e4ff6575376507e1b8e0deff071c1866f9d556f9d72da11797f8fefe70298232c07d6c50543d9aa54b475ef91771bdcc5a39462bae3b39629027699bf  py3-simframe-1.0.5.tar.gz
"
