# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-autograd-gamma
pkgver=0.4.3
pkgrel=2
pkgdesc="autograd compatible approximations to the derivatives of the Gamma-family of functions"
url="https://github.com/CamDavidsonPilon/autograd-gamma"
arch="noarch"
license="MIT"
depends="
	python3
	py3-autograd
	py3-scipy
	"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/CamDavidsonPilon/autograd-gamma/archive/v$pkgver/autograd-gamma-$pkgver.tar.gz"
builddir="$srcdir/autograd-gamma-$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="
6d4ac784e15b7314677a23d781a866a614667f18b6083e4c4d7786d828fff694a7cf3ad04fbdbace375ad747965b1f4c9404c542c30aab16d6aa647e222f581f  autograd-gamma-0.4.3.tar.gz
"
