# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-dominate
pkgver=2.9.1
pkgrel=1
pkgdesc="Library for creating and manipulating HTML documents using an elegant DOM API"
url="https://github.com/Knio/dominate/"
arch="noarch"
license="LGPL-3.0-only"
depends="python3"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Knio/dominate/archive/$pkgver.tar.gz"
builddir="$srcdir/dominate-$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="
d13b3fcc22176b2ad0c393887b6b3fa896252f9c4126a017eb696a973c05090cbbf0b0437495761987e1f08b76d0e2901d06c61b02b6b20a4aac652ec2867297  py3-dominate-2.9.1.tar.gz
"
