diff options
author | isaackwy <isaacyu@protonmail.com> | 2024-06-11 22:48:19 -0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-06-15 07:37:45 +0700 |
commit | 560d921b99628f160055dbf1701bc47aa3ad613f (patch) | |
tree | 8b11b78a13563ab62a557c18fecc2b4cb13bc9c2 /python | |
parent | 5828c64ca84e89cb3fe4b64644357d3d173bac63 (diff) | |
download | slackbuilds-560d921b99628f160055dbf1701bc47aa3ad613f.tar.xz |
python/python3-shtab: Update for 1.7.1 (+take back maintenance)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/python3-shtab/python3-shtab.SlackBuild | 37 | ||||
-rw-r--r-- | python/python3-shtab/python3-shtab.info | 12 |
2 files changed, 25 insertions, 24 deletions
diff --git a/python/python3-shtab/python3-shtab.SlackBuild b/python/python3-shtab/python3-shtab.SlackBuild index 97c18b7b3545..0007661c26a9 100644 --- a/python/python3-shtab/python3-shtab.SlackBuild +++ b/python/python3-shtab/python3-shtab.SlackBuild @@ -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 diff --git a/python/python3-shtab/python3-shtab.info b/python/python3-shtab/python3-shtab.info index 1308f58d9806..70a1e1b0de65 100644 --- a/python/python3-shtab/python3-shtab.info +++ b/python/python3-shtab/python3-shtab.info @@ -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" |