From 9aaf7fa2e957af05d1154ff742581ed1bbe0d380 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Fri, 30 Aug 2024 23:23:05 +0200 Subject: [PATCH] testing/py3-publicsuffix2: build with gpep517 --- testing/py3-publicsuffix2/APKBUILD | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/testing/py3-publicsuffix2/APKBUILD b/testing/py3-publicsuffix2/APKBUILD index d4eb1fad52c..fb7cf760811 100644 --- a/testing/py3-publicsuffix2/APKBUILD +++ b/testing/py3-publicsuffix2/APKBUILD @@ -3,32 +3,39 @@ pkgname=py3-publicsuffix2 _pkgname=python-publicsuffix2 _pkgver=2.2019-12-21 -pkgver=${_pkgver//-} -pkgrel=5 +pkgver=${_pkgver//-/} +pkgrel=6 pkgdesc="Python library to deal with publicsuffix data" url="https://github.com/nexB/python-publicsuffix2" license="MIT AND MPL-2.0" arch="noarch" depends="python3 py3-requests" -makedepends="py3-setuptools" +makedepends="py3-setuptools py3-gpep517" checkdepends="py3-pytest" subpackages="$pkgname-pyc" source="$_pkgname-release-$_pkgver.tar.gz::https://github.com/nexB/python-publicsuffix2/archive/release-$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-release-$_pkgver" build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - PYTHONPATH="$PWD"/build/lib pytest + python3 -m venv --clear --without-pip --system-site-packages .testenv + gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl + .testenv/bin/python3 -m pytest } package() { - python3 setup.py install --skip-build --root="$pkgdir" + gpep517 install-wheel --destdir "$pkgdir" \ + .dist/*.whl # remove stray license file; SPDX identifier is sufficient in Alpine rm "$pkgdir"/usr/lib/python3.*/site-packages/publicsuffix2/mpl-2.0.LICENSE } -sha512sums="983bdb17b76d10eb73cf69f0ba7590806bf6786ae0c30526593ce1ab97f3b22c967f9acae83b880dd56be41a29eae9cca5726926667eb74013d0d1078433bf05 python-publicsuffix2-release-2.2019-12-21.tar.gz" +sha512sums=" +983bdb17b76d10eb73cf69f0ba7590806bf6786ae0c30526593ce1ab97f3b22c967f9acae83b880dd56be41a29eae9cca5726926667eb74013d0d1078433bf05 python-publicsuffix2-release-2.2019-12-21.tar.gz +"