# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-bioframe
pkgver=0.8.0
pkgrel=0
pkgdesc="Pandas utilities for tab-delimited and other genomic data files"
url="https://github.com/open2c/bioframe"
arch="noarch !armhf !armv7 !x86" #assertion errors
options="net"
license="MIT"
depends="py3-matplotlib py3-numpy py3-pandas py3-yaml py3-requests py3-typing-extensions py3-setuptools"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-hatchling py3-setuptools py3-wheel"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/open2c/bioframe/archive/v$pkgver/bioframe-$pkgver.tar.gz"
builddir="$srcdir/bioframe-$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 --ignore="tests/test_fileops.py"
}

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

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/bioframe/io/data/

	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
26e72bb93413af0837b11b6e898c61619ad911386bd243e43b97cc881ffaaca1d02aa56a1bffa7640d916b4d30cdee7ce98edac2c4e2f370f76dd33bea7c2fc3  bioframe-0.8.0.tar.gz
"
