diff options
author | Steven Voges <svoges.sbo@gmail.com> | 2022-09-08 08:11:43 +0100 |
---|---|---|
committer | Dave Woodfall <dave@slackbuilds.org> | 2022-09-08 08:11:43 +0100 |
commit | 49a82ac149792bd38801e17ac549928d4376c7e9 (patch) | |
tree | 3ca24ecd74ecde9e4aea074c7261e7dc740870a4 /python/python3-questionary | |
parent | 2b4673188b7e9bc3f2844b847388c5be1693e6be (diff) | |
download | slackbuilds-49a82ac149792bd38801e17ac549928d4376c7e9.tar.gz |
python/python3-questionary: Added (Pretty CLI Interface)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Diffstat (limited to 'python/python3-questionary')
-rw-r--r-- | python/python3-questionary/README | 13 | ||||
-rw-r--r-- | python/python3-questionary/python3-questionary.SlackBuild | 95 | ||||
-rw-r--r-- | python/python3-questionary/python3-questionary.info | 10 | ||||
-rw-r--r-- | python/python3-questionary/slack-desc | 19 |
4 files changed, 137 insertions, 0 deletions
diff --git a/python/python3-questionary/README b/python/python3-questionary/README new file mode 100644 index 0000000000..15c6055d2b --- /dev/null +++ b/python/python3-questionary/README @@ -0,0 +1,13 @@ +Questionary is a Python library for effortlessly building pretty +command line interfaces + +Questionary supports the following input prompts: + + * Text + * Password + * File Path + * Confirmation + * Select + * Raw select + * Checkbox + * Autocomplete diff --git a/python/python3-questionary/python3-questionary.SlackBuild b/python/python3-questionary/python3-questionary.SlackBuild new file mode 100644 index 0000000000..44a61982dc --- /dev/null +++ b/python/python3-questionary/python3-questionary.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/bash + +# Slackware build script for python3-questionary + +# Copyright 2022 Steven Voges <Oregon, USA> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-questionary +SRCNAM=questionary +VERSION=${VERSION:-1.10.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +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 +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +python3 setup.py install --root=$PKG + +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 \ + LICENSE PKG-INFO README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/python3-questionary/python3-questionary.info b/python/python3-questionary/python3-questionary.info new file mode 100644 index 0000000000..418dea7650 --- /dev/null +++ b/python/python3-questionary/python3-questionary.info @@ -0,0 +1,10 @@ +PRGNAM="python3-questionary" +VERSION="1.10.0" +HOMEPAGE="https://github.com/tmbo/questionary" +DOWNLOAD="https://files.pythonhosted.org/packages/04/c6/a8dbf1edcbc236d93348f6e7c437cf09c7356dd27119fcc3be9d70c93bb1/questionary-1.10.0.tar.gz" +MD5SUM="0fc453e2b7f2516e76edf321b58c1332" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-prompt_toolkit" +MAINTAINER="Steven Voges" +EMAIL="svoges.sbo@gmail.com" diff --git a/python/python3-questionary/slack-desc b/python/python3-questionary/slack-desc new file mode 100644 index 0000000000..41caeeddc8 --- /dev/null +++ b/python/python3-questionary/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python3-questionary: python3-questionary (Pretty CLI Interface) +python3-questionary: +python3-questionary: Python library to build pretty command line user prompts sparkles +python3-questionary: Easy to use multi-select lists, confirmations, free text prompts ... +python3-questionary: +python3-questionary: Homepage: https://github.com/tmbo/questionary +python3-questionary: +python3-questionary: +python3-questionary: +python3-questionary: +python3-questionary: |