# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=py3-meld3
_pkgname=meld3
pkgver=2.0.1
pkgrel=8
pkgdesc="An HTML/XML templating engine"
url="https://github.com/supervisor/meld3"
arch="noarch"
license="ZPL-2.1"
depends="python3"
makedepends="python3-dev py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver
replaces="py-meld3"			# Backwards compatibility
provides="py-meld3=$pkgver-r$pkgrel"	# Backwards compatibility

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 unittest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
b8203e0a71c7a0e5e38b265d80365b4b86a5bf66cc7e9c58d67e6beca563b992bc71f8e1afd8782ab2a60f0ada60405279dea894d6767326ff1ffcf66f255e1e  meld3-2.0.1.tar.gz
"
