testing/py3-publicsuffix2: build with gpep517

This commit is contained in:
ptrcnull 2024-08-30 23:23:05 +02:00
parent 7d03daa271
commit 9aaf7fa2e9

View File

@ -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
"