| 1 |
# Maintainer: Benjamin Abendroth <[email protected]> |
| 2 |
|
| 3 |
pkgname=python-crazy-complete |
| 4 |
pkgver=0.3.9 |
| 5 |
pkgrel=1 |
| 6 |
pkgdesc='Generate shell completion files for all major shells' |
| 7 |
arch=('any') |
| 8 |
url='https://github.com/crazy-complete/crazy-complete' |
| 9 |
license=('GPL-3') |
| 10 |
depends=('python' 'python-yaml') |
| 11 |
makedepends=( |
| 12 |
'git' |
| 13 |
'python-build' |
| 14 |
'python-installer' |
| 15 |
'python-wheel' |
| 16 |
'python-setuptools-scm' |
| 17 |
) |
| 18 |
|
| 19 |
#_commit='f09e930b12081d1afbd06b0376f88040d30a807c' |
| 20 |
source=("$pkgname::git+$url") ##commit=$_commit") |
| 21 |
b2sums=('SKIP') |
| 22 |
|
| 23 |
build() { |
| 24 |
cd "$pkgname" |
| 25 |
|
| 26 |
python -m build --wheel --no-isolation |
| 27 |
|
| 28 |
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") |
| 29 |
|
| 30 |
# install to temporary directory |
| 31 |
python -m installer --destdir="$PWD/tmp_install" dist/*.whl |
| 32 |
|
| 33 |
export PYTHONPATH="$PWD/tmp_install$site_packages" |
| 34 |
} |
| 35 |
|
| 36 |
package() { |
| 37 |
cd "$pkgname" |
| 38 |
|
| 39 |
python -m installer --destdir="$pkgdir" dist/*.whl |
| 40 |
|
| 41 |
# # completions |
| 42 |
# install -vDm644 bash.completion "$pkgdir/usr/share/bash-completion/completions/shtab" |
| 43 |
# install -vDm644 zsh.completion "$pkgdir/usr/share/zsh/site-functions/_shtab" |
| 44 |
|
| 45 |
# # symlink license file |
| 46 |
# local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") |
| 47 |
# install -d "$pkgdir/usr/share/licenses/$pkgname" |
| 48 |
# ln -s "$site_packages/${pkgname#python-}-$pkgver.dist-info/LICENCE" \ |
| 49 |
# "$pkgdir/usr/share/licenses/$pkgname/LICENCE" |
| 50 |
} |