# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-xmlsec
_pkgreal=xmlsec
pkgver=1.3.14
pkgrel=1
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
	incompatible-pointer-types.patch"
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="
7ac5b3f1d983662153393ac06be606ade2e8043fc1be85db08ab1920cf30a7668d9a33d9b9e219f8ab9816a82ba35b3dd022175f0cc68c8792a61098566fc4c4  py3-xmlsec-1.3.14.tar.gz
c8ad084a8c073d5ae8e16ad089061d65bef8924cf80a538647bf5bcd4bdba695d5bb170ef2d6cdfa4e7e00d9a0a43002a3f5597fc6b01debe21c35191a4cbe8b  incompatible-pointer-types.patch
"
