# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-xmlsec
_pkgreal=xmlsec
pkgver=1.3.15
pkgrel=0
arch="all"
pkgdesc="Python bindings for the XML Security Library"
url="https://pypi.python.org/project/xmlsec"
license="MIT"
depends="
	py3-lxml
	xmlsec
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-pkgconfig
	py3-wheel
	python3-dev
	libxml2-dev
	xmlsec-dev
	"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/x/xmlsec/xmlsec-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgreal-$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 -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}
sha512sums="
425387414bdeb8b530ea376941c703ff0bd34eade3be6187f2fa86b4a0a64314f7641cd074c178c04cb7fb68de6ac84450ed905bad40ad6506bff35860b916d0  py3-xmlsec-1.3.15.tar.gz
"
