# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=cepces
pkgver=0.3.9
pkgrel=1
pkgdesc="Application for enrolling certificates through CEP and CES"
url="https://github.com/openSUSE/cepces"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	python3
	py3-cryptography
	py3-python-gssapi
	py3-requests-gssapi
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-krb5"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/cepces/archive/refs/tags/v$pkgver.tar.gz"

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 tests/runner.py
}

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

sha512sums="
c94dddfba06d5095fa48e15719131f3fa36b104a88c71505663b1cfc793e93d9d9281be77fbbdbd6c683f14c481c7ed01d44c527d97b98ac4653eeb3c057382d  cepces-0.3.9.tar.gz
"
