# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-dj-database-url
pkgver=2.3.0
pkgrel=0
pkgdesc="Use Database URLs in your Django Application"
url="https://pypi.org/project/dj-database-url/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-django"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/jazzband/dj-database-url/archive/v$pkgver/py3-dj-database-url-$pkgver.tar.gz
	typing-ext.patch
	"
builddir="$srcdir/dj-database-url-$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="
9960ec173d55654ba87e9b9320a86eb0747f70949a53a9478a5e2045c8cde3cf979c782f499fdc9790a32ac03d9e90491f8d7a913aae89072e1b5da389b72378  py3-dj-database-url-2.3.0.tar.gz
0f603d58ac18e1925a7c17939452b96252afe3f02bbdcfb48fb794b25bec7f494084e0d9f066bf8500be09393755d8dc155e7258d8709661281c0bce37252a72  typing-ext.patch
"
