# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-django-htmx
pkgver=1.21.0
pkgrel=0
pkgdesc="Extensions for using Django with htmx"
url="https://django-htmx.readthedocs.io/"
arch="noarch"
license="MIT"
depends="
	py3-asgiref
	py3-django
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest-django"
subpackages="$pkgname-pyc"
source="https://github.com/adamchainz/django-htmx/archive/$pkgver/py3-django-htmx-$pkgver.tar.gz"
builddir="$srcdir/django-htmx-$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="
523cdc8e5a9daca329128ea3481b14f4512c3c058ab8aa7b64f64122aad9a09a5e9187e1c21d33ccc3980c01e210a6aaaeeb7ba9ff56f179341d9ecf513e1749  py3-django-htmx-1.21.0.tar.gz
"
