George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
toot


Commits:
e051e555 by George Rawlinson at 2023-12-28T16:56:02+13:00
upgpkg: 0.40.0-1

* Add shell completions.

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,6 +1,6 @@
 pkgbase = toot
        pkgdesc = A Mastodon CLI client
-       pkgver = 0.39.0
+       pkgver = 0.40.0
        pkgrel = 1
        url = https://github.com/ihabunek/toot
        arch = any
@@ -16,7 +16,9 @@ pkgbase = toot
        depends = python-wcwidth
        depends = python-urwid
        depends = python-tomlkit
-       source = 
toot::git+https://github.com/ihabunek/toot#commit=509afd16a8479240f81d7566896ed9e97a1d109f
+       depends = python-click
+       depends = python-typing_extensions
+       source = 
toot::git+https://github.com/ihabunek/toot#commit=41b77cc9de77abfb333430295e701f6ab769c806
        b2sums = SKIP
 
 pkgname = toot


=====================================
PKGBUILD
=====================================
@@ -1,7 +1,7 @@
 # Maintainer: George Rawlinson <grawlin...@archlinux.org>
 
 pkgname=toot
-pkgver=0.39.0
+pkgver=0.40.0
 pkgrel=1
 pkgdesc='A Mastodon CLI client'
 arch=('any')
@@ -14,6 +14,8 @@ depends=(
   'python-wcwidth'
   'python-urwid'
   'python-tomlkit'
+  'python-click'
+  'python-typing_extensions'
 )
 makedepends=(
   'git'
@@ -22,7 +24,7 @@ makedepends=(
   'python-setuptools'
   'python-wheel'
 )
-_commit='509afd16a8479240f81d7566896ed9e97a1d109f'
+_commit='41b77cc9de77abfb333430295e701f6ab769c806'
 source=("$pkgname::git+$url#commit=$_commit")
 b2sums=('SKIP')
 
@@ -36,10 +38,24 @@ build() {
   cd "$pkgname"
 
   python -m build --wheel --no-isolation
+
+  # generate shell completions
+  python -m installer --destdir="$(pwd)/tmp" dist/*.whl
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  export PATH="$(pwd)/tmp/usr/bin:$PATH"
+  export PYTHONPATH="$(pwd)/tmp/$site_packages"
+  for shell in bash fish zsh; do
+  _TOOT_COMPLETE=${shell}_source toot > "$shell.completion"
+  done
 }
 
 package() {
   cd "$pkgname"
 
   python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # shell completion
+  install -vDm644 bash.completion 
"$pkgdir/usr/share/bash-completion/completions/toot"
+  install -vDm644 fish.completion 
"$pkgdir/usr/share/fish/vendor_completions.d/toot.fish"
+  install -vDm644 zsh.completion "$pkgdir/usr/share/zsh/site-functions/_toot"
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/toot/-/commit/e051e555e28caae407884aec8d6c90dc6f7be83f

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/toot/-/commit/e051e555e28caae407884aec8d6c90dc6f7be83f
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to