# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py3-parameterized
_pkgname=parameterized
pkgver=0.9.0
pkgrel=2
pkgdesc="Parameterized testing with any Python test framework"
url="https://github.com/wolever/parameterized"
arch="noarch"
license="BSD-2-Clause"
depends="python3"
makedepends="py3-setuptools py3-gpep517 py3-wheel py3-installer"
checkdepends="py3-nose py3-mock py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/parameterized/parameterized-$pkgver.tar.gz
	python-3.12.patch"
builddir="$srcdir/"$_pkgname-$pkgver

replaces="py-parameterized" # Backwards compatibility
provides="py-parameterized=$pkgver-r$pkgrel" # Backwards compatibility

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

check() {
#	nosetests
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m nose
}

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

sha512sums="
2c1c97a841db631608e0a9fcd93fa1af819aa288538851e0c771b56ba0bb27fb682ac3a09fcdb33e57162926d1e8fae452f7bab9384d0c40bec9a03ab3d6b126  parameterized-0.9.0.tar.gz
1ad0361f97785c94e3effff883ca2abb75406cb5e0abb6c03e637213005887c8eea90706efe20d43bce54742c4ba4c371678be3810367cf253c1c5e2ad0efc52  python-3.12.patch
"
