# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=py3-betamax_matchers
pkgver=0.4.0
pkgrel=6
pkgdesc="A group of experimental matchers for Betamax"
url="https://github.com/betamaxpy/betamax_matchers"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-betamax py3-requests-toolbelt"
makedepends="py3-gpep517 py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/betamaxpy/betamax_matchers/archive/$pkgver.tar.gz"
builddir="$srcdir/betamax_matchers-$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="
202255d9895b118d03efa20aa64f5b099045750dcb9a1ad3eda164d3da372207f1bee8a40f63cdf179da90cfc4380e5a004e5f9c94f006a6f3dbc64e29766c86  py3-betamax_matchers-0.4.0.tar.gz
"
