# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-sybil
pkgver=9.1.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="
1b0498ed14114398d0580eb35f3a6c693bc2bbef9cec47beb7084581e82487b15b6fd5266c2cb8927ea412624e3c1a66c65f14f6007196ab7aa9dcd0668cd3d8  py3-sybil-9.1.0.tar.gz
"
