# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-dynamic-fixture
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=django-dynamic-fixture
pkgver=4.0.1
pkgrel=1
pkgdesc="A complete library to create dynamic model instances for testing purposes."
url="https://pypi.python.org/project/django-dynamic-fixture"
arch="noarch"
license="BSD-3-Clause"
depends="py3-django"
checkdepends="py3-pytest py3-pytest-django py3-pytest-cov py3-psycopg2"
makedepends="py3-setuptools py3-gpep517 py3-wheel poetry"
source="$pkgname-$pkgver.tar.gz::https://github.com/paulocheque/django-dynamic-fixture/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"

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 -v
}

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

sha512sums="
e2a1a67459cf35f092b8f3e34a6162ef3334062f2f779df593f1f7e738371e28996a7e96d6a08397385a7b29d59be143284cf4a921cb2da972ee238d1ff6660d  py3-django-dynamic-fixture-4.0.1.tar.gz
"
