# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ddt
pkgver=1.7.2
pkgrel=0
pkgdesc="Python library to multiply test cases"
url="https://github.com/datadriventests/ddt"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="
	py3-aiounittest
	py3-mock
	py3-pytest
	py3-six
	py3-yaml
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/d/ddt/ddt-$pkgver.tar.gz"
builddir="$srcdir/ddt-$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="
90db674075f1174014fb7a88810267023f57e446535bade44a60e3027df6317fe555ca127bf682b5619188f087a533b985b3c6fc9aa96f065598faaaf19a3d7c  ddt-1.7.2.tar.gz
"
