# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-sphinxcontrib-qthelp
_pyname=sphinxcontrib-qthelp
pkgver=2.0.0
pkgrel=0
pkgdesc="Sphinx qthelp extension"
url="https://pypi.org/project/sphinxcontrib-qthelp"
arch="noarch"
license="BSD-2-Clause"
depends="python3"
makedepends="py3-gpep517 py3-flit-core py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-sphinx"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/sphinx-doc/sphinxcontrib-qthelp/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
options="!check" # py3-sphinx is a circular dep

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="
13725db4a7916e031d496f379b52698afc7640377bee182347440bb93d03c8b0715abfe6e533b08dd770f82354cdf75636a977f73caf1b91bebd27e8952efd5d  sphinxcontrib-qthelp-2.0.0.tar.gz
"
