# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-sybil
pkgver=9.0.0
pkgrel=0
pkgdesc="Automated testing for the examples in your documentation"
url="https://github.com/simplistix/sybil"
arch="noarch"
license="MIT"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-sphinx
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-seedir
	py3-testfixtures
	py3-yaml
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/simplistix/sybil/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/sybil-$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 -k 'not test_pytest'
}

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


sha512sums="
098efe001c17606cbf3ab4095ca9b85e784a13af67d48d898a2622c18c6a506507ba7dddd43a232bb8c270734b9fadb24aeff356833a854a45285521a06c3ed8  py3-sybil-9.0.0.tar.gz
"
