python-shtab: update to 1.7.0
This commit is contained in:
committed by
Maksim Bondarenkov
parent
e1b0a940d3
commit
decceaef7d
@@ -3,11 +3,11 @@
|
||||
_realname=shtab
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=1.6.5
|
||||
pkgver=1.7.0
|
||||
pkgrel=1
|
||||
pkgdesc="Automagic shell tab completion for Python CLI applications (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
msys2_references=(
|
||||
'archlinux: python-shtab'
|
||||
'pypi: shtab'
|
||||
@@ -15,7 +15,7 @@ msys2_references=(
|
||||
url='https://github.com/iterative/shtab'
|
||||
license=('spdx:Apache-2.0')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
|
||||
@@ -24,7 +24,7 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pytest-timeout")
|
||||
options=('!strip')
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('cf4ab120183e84cce041abeb6f620f9560739741dfc31dd466315550c08be9ec')
|
||||
sha256sums=('6661c2835d0214e259ab74d09bdb9a863752e898bcf2e75ad8cf7ebd7c35bc7e')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
@@ -33,22 +33,18 @@ prepare() {
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}"
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
||||
|
||||
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Python test for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
|
||||
${MINGW_PREFIX}/bin/python -m pytest || warning "Tests failed"
|
||||
}
|
||||
|
||||
package() {
|
||||
msg "Python install for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
@@ -56,11 +52,9 @@ package() {
|
||||
--destdir="${pkgdir}" dist/*.whl
|
||||
|
||||
# Generate shell completions
|
||||
for _shell in bash zsh; do
|
||||
python -m shtab --print-own-completion "${_shell}" > "${_shell}.completion"
|
||||
done
|
||||
local _complete="python -m shtab --print-own-completion"
|
||||
$_complete bash | install -Dm644 /dev/stdin "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/shtab"
|
||||
$_complete zsh | install -Dm644 /dev/stdin "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_shtab"
|
||||
|
||||
install -Dm644 bash.completion "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/shtab"
|
||||
install -Dm644 zsh.completion "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_shtab"
|
||||
install -Dm644 LICENCE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENCE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user