# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-kallisto
pkgver=1.0.10
pkgrel=2
pkgdesc="Efficiently calculate 3D-atomic/molecular features for quantitative structure-activity relationship approaches"
url="https://github.com/AstraZeneca/kallisto"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-click py3-numpy py3-scipy"
makedepends="py3-poetry-core py3-gpep517 py3-wheel"
checkdepends="py3-pytest py3-pytest-runner"
subpackages="$pkgname-pyc"
source="https://github.com/AstraZeneca/kallisto/archive/v$pkgver/kallisto-$pkgver.tar.gz
	poetry.patch
	"
builddir="$srcdir/kallisto-$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
}

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

sha512sums="
bcab352fa93596923b44fb30750aa66158364c477e37a7ee5e7b40f8376d40f054309c55bb9cb1acb4a0deff833912c964e879ac0b25ccc5f95931082e5a6a2d  kallisto-1.0.10.tar.gz
83389c19ae22df41959a453a255c945392a5593ce659cbe96703ed868dad1125b9830159d2a2d1834ae13113ebc3aeaf10ecbfc8efab1eaf5f3fb4ef8a24df83  poetry.patch
"
