# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-pytest-instafail
pkgver=0.5.0
pkgrel=2
pkgdesc="pytest plugin to show failures instantly"
url="https://github.com/pytest-dev/pytest-instafail"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-pytest"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pytest-instafail/pytest-instafail-$pkgver.tar.gz"
builddir="$srcdir/pytest-instafail-$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
}

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

sha512sums="
a2dadd855057b101d94bca62cbc384dbc81bcfa30a3d8f0707ce02ce588a5edb569f0acb6aba42261371885e7b93661abe6f4ceb41ef339569a5d54f434a60cc  py3-pytest-instafail-0.5.0.tar.gz
"
