# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
# Maintainer: Kaarle Ritvanen <kunkku@alpinelinux.org>
pkgname=py3-django-contact-form
pkgver=2.0.1
pkgrel=1
pkgdesc="Generic contact-form application for Django"
url="https://github.com/ubernostrum/django-contact-form"
arch="noarch"
license="BSD-3-Clause"
depends="py3-django"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="tzdata py3-pytest"
replaces="py-django-contact-form"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/d/django-contact-form/django-contact-form-$pkgver.tar.gz"
builddir="$srcdir/django-contact-form-$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 runtests.py
}

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

sha512sums="
7aed259fe3d20433786d17d2a1ec7f05e3791cf0c2e3851dc1e330803227d006a419ad6c4c7540dd05f07b1706b56e231d030695634d3f1d2ccf7e832909f975  django-contact-form-2.0.1.tar.gz
"
