# Contributor: <xmingske@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-django-pipeline
pkgver=4.0.0
pkgrel=0
pkgdesc="an asset packaging library for Django"
options="!check" # Can't run tests
url="https://github.com/jazzband/django-pipeline"
arch="noarch"
license="JSON"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools_scm
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/d/django_pipeline/django_pipeline-$pkgver.tar.gz"
builddir="$srcdir/django_pipeline-$pkgver"

build() {
	SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver \
	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="
b6adfb4ebc413614a444c848fcef937d14956832d08daa83de718bc1723045be22d5ac4dd508fcc144c2a50b13222f73213bbc08e0b14edc821e7941d58861fe  django_pipeline-4.0.0.tar.gz
"
