From 154d7f9bb39fb1d635b75fa3ec91c4a9e9d5e822 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Fri, 30 Aug 2024 23:21:17 +0200 Subject: [PATCH] testing/py3-ntplib: build with gpep517 --- testing/py3-ntplib/APKBUILD | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/testing/py3-ntplib/APKBUILD b/testing/py3-ntplib/APKBUILD index 55581b71675..9eb1018370f 100644 --- a/testing/py3-ntplib/APKBUILD +++ b/testing/py3-ntplib/APKBUILD @@ -3,30 +3,35 @@ pkgname=py3-ntplib _pkgname=ntplib pkgver=0.4.0 -pkgrel=4 +pkgrel=5 pkgdesc="Python module that offers a simple interface to query NTP servers" -options="net" # Requires connecting to pool.ntp.org url="https://pypi.org/project/ntplib" arch="noarch" license="MIT" replaces="py-ntplib" # for backwards compatibility provides="py-ntplib=$pkgver-r$pkgrel" # for backwards compatibility depends="python3" -makedepends="python3-dev py3-setuptools" +makedepends="python3-dev py3-setuptools py3-gpep517" subpackages="$pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/cf-natali/ntplib/archive/$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver +options="net" # Requires connecting to pool.ntp.org build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - python3 -m unittest + python3 -m venv --clear --without-pip --system-site-packages .testenv + gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl + .testenv/bin/python3 -m unittest discover } package() { - python3 setup.py install --skip-build --root="$pkgdir" + gpep517 install-wheel --destdir "$pkgdir" \ + .dist/*.whl } sha512sums="