Date: Saturday, May 13, 2023 @ 09:13:00
Author: grawlinson
Revision: 1460176
archrelease: copy trunk to community-any
Added:
python-shtab/repos/community-any/PKGBUILD
(from rev 1460175, python-shtab/trunk/PKGBUILD)
Deleted:
python-shtab/repos/community-any/PKGBUILD
----------+
PKGBUILD | 122 ++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 69 insertions(+), 53 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-05-13 09:11:57 UTC (rev 1460175)
+++ PKGBUILD 2023-05-13 09:13:00 UTC (rev 1460176)
@@ -1,53 +0,0 @@
-# Maintainer: George Rawlinson <[email protected]>
-# Contributor: SZanko, szanko at protonmail dot com
-
-pkgname=python-shtab
-pkgver=1.6.0
-pkgrel=2
-pkgdesc='Automagic shell tab completion for Python CLI applications'
-arch=('any')
-url='https://github.com/iterative/shtab'
-license=('Apache')
-depends=('python')
-makedepends=(
- 'git'
- 'python-build'
- 'python-installer'
- 'python-wheel'
- 'python-setuptools-scm'
-)
-checkdepends=(
- 'python-pytest'
- 'python-pytest-cov'
- 'python-pytest-timeout'
-)
-_commit='68ac16999be08cf5033c601f162020bde4aaf0ad'
-source=("$pkgname::git+$url#commit=$_commit")
-b2sums=('SKIP')
-
-pkgver() {
- cd "$pkgname"
-
- git describe --tags | sed 's/^v//'
-}
-
-build() {
- cd "$pkgname"
-
- python -m build --wheel --no-isolation
-}
-
-check() {
- cd "$pkgname"
-
- pytest -v
-}
-
-package() {
- cd "$pkgname"
-
- python -m installer --destdir="$pkgdir" dist/*.whl
-
- # license
- install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENCE
-}
Copied: python-shtab/repos/community-any/PKGBUILD (from rev 1460175,
python-shtab/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-05-13 09:13:00 UTC (rev 1460176)
@@ -0,0 +1,69 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: SZanko, szanko at protonmail dot com
+
+pkgname=python-shtab
+pkgver=1.6.1
+pkgrel=1
+pkgdesc='Automagic shell tab completion for Python CLI applications'
+arch=('any')
+url='https://github.com/iterative/shtab'
+license=('Apache')
+depends=('python')
+makedepends=(
+ 'git'
+ 'python-build'
+ 'python-installer'
+ 'python-wheel'
+ 'python-setuptools-scm'
+)
+checkdepends=(
+ 'python-pytest'
+ 'python-pytest-cov'
+ 'python-pytest-timeout'
+)
+_commit='80a105058bafd32c0669eb2e2b477502f195c48e'
+source=("$pkgname::git+$url#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed 's/^v//'
+}
+
+build() {
+ cd "$pkgname"
+
+ python -m build --wheel --no-isolation
+
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+
+ # install to temporary directory
+ python -m installer --destdir="$PWD/tmp_install" dist/*.whl
+
+ export PYTHONPATH="$PWD/tmp_install$site_packages"
+
+ # generate shell completions
+ for shell in bash zsh; do
+ python -m shtab --print-own-completion "$shell" > "$shell.completion"
+ done
+}
+
+check() {
+ cd "$pkgname"
+
+ pytest -v
+}
+
+package() {
+ cd "$pkgname"
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # completions
+ install -vDm644 bash.completion
"$pkgdir/usr/share/bash-completion/completions/shtab"
+ install -vDm644 zsh.completion "$pkgdir/usr/share/zsh/site-functions/_shtab"
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENCE
+}