From 1f479887d2edfbddd55fe1771a2bdd091f470da8 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Tue, 6 Aug 2024 14:32:32 +0200 Subject: [PATCH] testing/py3-us: build with gpep517 --- testing/py3-us/APKBUILD | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/testing/py3-us/APKBUILD b/testing/py3-us/APKBUILD index 9e1eadcb9cb..d026b8bc4b6 100644 --- a/testing/py3-us/APKBUILD +++ b/testing/py3-us/APKBUILD @@ -3,31 +3,37 @@ pkgname=py3-us _pkgname=us pkgver=3.1.1 -pkgrel=1 +pkgrel=2 pkgdesc="US state meta information and other fun stuff" url="https://github.com/unitedstates/python-us" arch="noarch" license="BSD-3-Clause" -replaces="py-us" # for backwards compatibility -provides="py-us=$pkgver-r$pkgrel" # for backwards compatibility depends="py3-jellyfish python3" -makedepends="py3-setuptools" +makedepends="py3-setuptools py3-gpep517" checkdepends="py3-pytest py3-tz" subpackages="$pkgname-pyc" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz fix-requires.patch" builddir="$srcdir"/$_pkgname-$pkgver +replaces="py-us" # for backwards compatibility +provides="py-us=$pkgver-r$pkgrel" # for backwards compatibility + build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - pytest-3 + 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 } sha512sums="