# Contributor: Dhruvin Gandhi <contact@dhru.vin>
# Maintainer: Dhruvin Gandhi <contact@dhru.vin>
pkgname=py3-sphinx-autorun
_pyname=sphinx-autorun
pkgver=2.0.0
pkgrel=0
pkgdesc="Sphinx extension to attach the output of runblock directive to the document"
url="https://github.com/WhyNotHugo/sphinx-autorun"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-sphinx"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
options="!check" # no tests
subpackages="$pkgname-pyc"
source="https://github.com/WhyNotHugo/sphinx-autorun/archive/refs/tags/v$pkgver/sphinx-autorun-$pkgver.tar.gz"
builddir="$srcdir/sphinx-autorun-$pkgver"

prepare() {
	default_prepare
	echo "Version: $pkgver" > PKG-INFO
}

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

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

sha512sums="
04c32bffdbb8baaa6984edb9ba039c6f5ba51d18444026c3ddd2b60a879146ae66ca0dd1b71c2e17bf91b0642e7b4bdc98333a7566a81afde5fce791bc7f25b3  sphinx-autorun-2.0.0.tar.gz
"
