# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-xfail
_pyname="xfail.py"
pkgver=1.1.2
# maintainer does not use gittag for releases, but tests are only on github
_gittag=4f2e7b958501ba4ec2e553c9d599085bb8d1fe44
pkgrel=1
arch="noarch"
pkgdesc="Skip expected failures"
url="https://pypi.python.org/project/xfail"
license="MIT"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
	"
checkdepends="
	py3-pytest-runner
	py3-coverage
	py3-flake8
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/miyakogi/xfail.py/archive/$_gittag.tar.gz
	"
builddir="$srcdir"/$_pyname-$_gittag
subpackages="$pkgname-pyc"

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

check() {
	PYTHONPATH="$builddir"/src pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}
sha512sums="
cd9e4141b1e3254901e9cc99ae6134e274e7edc1c648cd59c00ff6dff61a737714331931bf6aa139f9a9e341be6eb5cee28e9c0c1ba3407e79edd432da51d6d3  py3-xfail-1.1.2.tar.gz
"
