| 1 | # Maintainer: Keith Toh <[email protected]> |
| 2 | pkgname=tldr-python-client |
| 3 | pkgver=3.3.0 |
| 4 | pkgrel=1 |
| 5 | pkgdesc="Command line client for tldr, a collection of simplified and community-driven man pages" |
| 6 | url="https://github.com/tldr-pages/tldr-python-client" |
| 7 | arch="noarch" |
| 8 | license="MIT" |
| 9 | depends="python3 py3-shtab py3-colorama py3-termcolor" |
| 10 | makedepends="py3-setuptools py3-sphinx py3-sphinx-argparse py3-gpep517" |
| 11 | checkdepends="py3-pytest" |
| 12 | subpackages="$pkgname-doc $pkgname-pyc" |
| 13 | source="$pkgname-$pkgver.tar.gz::https://github.com/tldr-pages/tldr-python-client/archive/refs/tags/$pkgver.tar.gz" |
| 14 | options="!check" # string compare fails now |
| 15 | |
| 16 | build() { |
| 17 | make -C docs/ man |
| 18 | gpep517 build-wheel \ |
| 19 | --wheel-dir .dist \ |
| 20 | --output-fd 3 3>&1 >&2 |
| 21 | } |
| 22 | |
| 23 | check() { |
| 24 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 25 | .testenv/bin/python3 -m installer .dist/*.whl |
| 26 | # test_error_message needs network access |
| 27 | .testenv/bin/python3 -m pytest -v -k "not test_error_message" |
| 28 | } |
| 29 | |
| 30 | package() { |
| 31 | gpep517 install-wheel --destdir "$pkgdir" \ |
| 32 | .dist/*.whl |
| 33 | install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/ |
| 34 | } |
| 35 | |
| 36 | sha512sums=" |
| 37 | 137560c401540ff1e747f443a3c0686ddba8c512772eadbff6b735aa9c20dd02a9c7b101b2238888daa20b2886dc4318bc7c1366d8b73f71dd2f797b1787b632 tldr-python-client-3.3.0.tar.gz |
| 38 | " |