# Contributor: Dhruvin Gandhi <contact@dhru.vin>
# Maintainer: Dhruvin Gandhi <contact@dhru.vin>
pkgname=py3-sphinx-click
_pyname=sphinx_click
pkgver=6.0.0
pkgrel=1
pkgdesc="Sphinx plugin to extract documentation from click-based applications"
url="https://github.com/click-contrib/sphinx-click"
arch="noarch"
license="MIT"
depends="python3 py3-sphinx py3-click py3-docutils"
makedepends="py3-gpep517 py3-pbr py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-click py3-coverage"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

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

sha512sums="
05f8a9713684d65de70f5762725e4a72928f194c01249dca462b4d4ca837ad3326cceb4d122ca6dcabaf4476af06a142d345e21112cedb1d41ed08f4efc227fc  sphinx_click-6.0.0.tar.gz
"
