1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Brett Cornwall <ainola@archlinux.org>
7 pkgdesc="Command line client for tldr, a collection of simplified and community-driven man pages."
9 url="https://github.com/tldr-pages/tldr-python-client"
11 depends=('python-shtab' 'python-colorama' 'python-termcolor')
15 'python-setuptools' # Set in pyproject.toml build
16 'python-sphinx-argparse'
19 checkdepends=('python-pytest')
20 source=("https://github.com/tldr-pages/tldr-python-client/archive/$pkgver/$pkgname-$pkgver.tar.gz")
21 sha512sums=('1535979548b49cd8b0312f2cd11f69ba3f710e16a27c074dc5a8cb5617d7f343df30ba01a83388b460508ab519045140852767bfc8ff1189d612d71a3d35d76b')
24 cd "tldr-python-client-$pkgver"
26 python -m build --wheel --no-isolation
29 # https://github.com/tldr-pages/tldr-python-client/issues/209
31 # cd tldr-python-client-$pkgver
36 cd "tldr-python-client-$pkgver"
37 python -m installer --destdir="$pkgdir" dist/*.whl
38 install -Dm644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"
40 # Generate here instead of a .install for package reproducibility
41 install -dm755 "$pkgdir/usr/share/bash-completion/completions/"
42 install -dm755 "$pkgdir/usr/share/zsh/site-functions/"
43 python "$pkgdir"/usr/lib/python*/site-packages/tldr.py --print-completion bash \
44 > "$pkgdir/usr/share/bash-completion/completions/tldr"
45 python "$pkgdir"/usr/lib/python*/site-packages/tldr.py --print-completion zsh \
46 > "$pkgdir/usr/share/zsh/site-functions/_tldr"