# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-outcome
pkgver=1.3.0
pkgrel=1
pkgdesc="Capture the outcome of Python function calls"
url="https://github.com/python-trio/outcome"
arch="noarch"
license="MIT OR Apache-2.0"
depends="
	py3-async_generator
	py3-attrs
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/o/outcome/outcome-$pkgver.tar.gz"
builddir="$srcdir/outcome-$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="
693885c90063b0073c93e699e9e2e6f068a373594be84030d314562df8b26a38c91fd2dbc4a8121bcd426d4f6598af9d9d60910e58282ac3fe40a9124ab2fe13  outcome-1.3.0.tar.gz
"
