python/python3-shtab: Update for 1.7.1 (+take back maintenance)

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
isaackwy 2024-06-11 22:48:19 -07:00 committed by Willy Sudiarto Raharjo
parent 5828c64ca8
commit 560d921b99
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 25 additions and 24 deletions

View File

@ -2,7 +2,7 @@
# Slackware build script for python3-shtab
# Copyright 2022-2023 Isaac Yu <isaacyu@protonmail.com>
# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-shtab
VERSION=${VERSION:-1.6.1}
VERSION=${VERSION:-1.7.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -49,20 +49,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
@ -78,13 +64,28 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
python3 setup.py install --root=$PKG
# Use newer setuptools despite not explicitly stating so within pyproject.toml.
# Otherwise, shtab does not compile properly
PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export PYTHONPATH=/opt/python$PYVER/site-packages/
python3 -m build --no-isolation
python3 -m installer -d "$PKG" dist/*.whl
# generate shell completions
for shell in bash zsh; do
python3 -m shtab --print-own-completion "$shell" > "$shell.completion"
done
# install completions
install -vDm644 bash.completion $PKG/usr/share/bash-completion/completions/shtab
install -vDm644 zsh.completion $PKG/usr/share/zsh/site-functions/_shtab
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md LICENCE README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View File

@ -1,10 +1,10 @@
PRGNAM="python3-shtab"
VERSION="1.6.1"
VERSION="1.7.1"
HOMEPAGE="https://github.com/iterative/shtab"
DOWNLOAD="https://github.com/iterative/shtab/releases/download/v1.6.1/shtab-1.6.1.tar.gz"
MD5SUM="d9e0f4e3a1c46dfc7d1cce2b10aaf217"
DOWNLOAD="https://github.com/iterative/shtab/releases/download/v1.7.1/shtab-1.7.1.tar.gz"
MD5SUM="da7bd07a2b2888974d6bf5c4ea70cdcf"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-wheel"
MAINTAINER="orphaned (no maintainer)"
EMAIL="nobody@domain.com"
REQUIRES="python3-setuptools-opt"
MAINTAINER="Isaac Yu"
EMAIL="isaacyu@protonmail.com"