# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-django-htmx
pkgver=1.23.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="
57bbbcb596372dddb76cd60b7bcafe7714a4d34eeef4f5116da381a874cceeabfa9cbebcb54935b9f4aebbc9cb3e4543701073f98442d612f18f144e2369a44e  py3-django-htmx-1.23.0.tar.gz
"
