From f454057404f88a05f3c84ed7c9c1478598c3ec60 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Thu, 15 Jun 2023 06:35:39 +0000
Subject: [PATCH] testing/cepces: modernise

---
 testing/cepces/APKBUILD | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/testing/cepces/APKBUILD b/testing/cepces/APKBUILD
index 3d323defbcf4..2fe1cbcfbbff 100644
--- a/testing/cepces/APKBUILD
+++ b/testing/cepces/APKBUILD
@@ -2,8 +2,8 @@
 # Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
 pkgname=cepces
 pkgver=0.3.7
-pkgrel=1
-pkgdesc="An application for enrolling certificates through CEP and CES"
+pkgrel=2
+pkgdesc="Application for enrolling certificates through CEP and CES"
 url="https://github.com/openSUSE/cepces"
 arch="noarch"
 license="GPL-3.0-or-later"
@@ -14,23 +14,26 @@ depends="
 	py3-python-gssapi
 	py3-requests-gssapi
 	"
-makedepends="py3-setuptools"
+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"
-#builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
-	python3 setup.py build
+	gpep517 build-wheel \
+		--wheel-dir .dist \
+		--output-fd 3 3>&1 >&2
 }
 
 check() {
-	#python3 setup.py test
-	PYTHONPATH=build/lib python3 tests/runner.py
+	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 setup.py install --skip-build --root="$pkgdir"
+	python3 -m installer -d "$pkgdir" \
+		.dist/*.whl
 }
 
 sha512sums="
-- 
GitLab