From 2f5f0cfd573a843935fb8068955f32b02046720e Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Sat, 10 Aug 2024 00:27:07 +0200 Subject: [PATCH] testing/tldr-python-client: build with gpep517 --- testing/tldr-python-client/APKBUILD | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/testing/tldr-python-client/APKBUILD b/testing/tldr-python-client/APKBUILD index d1648bbcf91..ccacc26fb8b 100644 --- a/testing/tldr-python-client/APKBUILD +++ b/testing/tldr-python-client/APKBUILD @@ -1,13 +1,13 @@ # Maintainer: Keith Toh pkgname=tldr-python-client pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Command line client for tldr, a collection of simplified and community-driven man pages" url="https://github.com/tldr-pages/tldr-python-client" arch="noarch" license="MIT" depends="python3 py3-shtab py3-colorama py3-termcolor" -makedepends="py3-setuptools py3-sphinx py3-sphinx-argparse" +makedepends="py3-setuptools py3-sphinx py3-sphinx-argparse py3-gpep517" checkdepends="py3-pytest" subpackages="$pkgname-doc $pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/tldr-pages/tldr-python-client/archive/refs/tags/$pkgver.tar.gz" @@ -15,16 +15,21 @@ options="!check" # string compare fails now build() { make -C docs/ man - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { + python3 -m venv --clear --without-pip --system-site-packages .testenv + gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl # test_error_message needs network access - pytest -v -k "not test_error_message" + .testenv/bin/python3 -m pytest -v -k "not test_error_message" } package() { - python3 setup.py install --skip-build --root="$pkgdir" + gpep517 install-wheel --destdir "$pkgdir" \ + .dist/*.whl install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/ }