# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-patchworklib
pkgver=0.6.3
pkgrel=1
pkgdesc="A subplot manager for intuitive layouts in matplotlib, seaborn, and plotnine"
url="https://github.com/ponnhide/patchworklib"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	python3
	py3-dill
	py3-matplotlib
	py3-numpy
	py3-pandas
	py3-plotnine
	py3-seaborn
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist py3-plotnine"
subpackages="$pkgname-pyc"
source="https://github.com/ponnhide/patchworklib/archive/v$pkgver/patchworklib-$pkgver.tar.gz"
builddir="$srcdir/patchworklib-$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 -k "not test_sns_and_p9"
}

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

sha512sums="
aace705d2e3b8e9cd67c882f2548204bfd968200fcc5b7fad5f021ef403aec1c90bc78eef02d3b83068358e22f8fa7bd3031da03dd1a3f2d7b385d14d6680b9a  patchworklib-0.6.3.tar.gz
"
