summaryrefslogtreecommitdiffstats
path: root/python/humanize
diff options
context:
space:
mode:
author Tonus <tonus1@free.fr>2023-03-03 03:14:32 +0000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-04 08:06:25 +0700
commitd215c88a2623d41f656929df826a75476522923f (patch)
tree148efac107fdbb921504201e65055f129945cb53 /python/humanize
parent65d629d7882ad7462be1c710aaa12ebeaa2577e8 (diff)
downloadslackbuilds-d215c88a2623d41f656929df826a75476522923f.tar.gz
slackbuilds-d215c88a2623d41f656929df826a75476522923f.tar.xz
python/humanize: Added (various common humanization utilities)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/humanize')
-rw-r--r--python/humanize/README6
-rw-r--r--python/humanize/humanize.SlackBuild97
-rw-r--r--python/humanize/humanize.info10
-rw-r--r--python/humanize/slack-desc19
4 files changed, 132 insertions, 0 deletions
diff --git a/python/humanize/README b/python/humanize/README
new file mode 100644
index 0000000000..8e061ea46b
--- /dev/null
+++ b/python/humanize/README
@@ -0,0 +1,6 @@
+This modest package contains various common humanization utilities,
+like turning a number into a fuzzy human-readable duration
+("3 minutes ago") or into a human-readable size or throughput.
+
+It is localized to at least 27 languages.
+
diff --git a/python/humanize/humanize.SlackBuild b/python/humanize/humanize.SlackBuild
new file mode 100644
index 0000000000..0fa2cb7577
--- /dev/null
+++ b/python/humanize/humanize.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+# Slackware build script for humanize
+
+# Copyright 2023 Tonus Paris
+# 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=humanize
+VERSION=${VERSION:-4.6.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 the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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 $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$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 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
+
+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 LICENCE 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/humanize/humanize.info b/python/humanize/humanize.info
new file mode 100644
index 0000000000..2f45038883
--- /dev/null
+++ b/python/humanize/humanize.info
@@ -0,0 +1,10 @@
+PRGNAM="humanize"
+VERSION="4.6.0"
+HOMEPAGE="https://github.com/python-humanize/humanize"
+DOWNLOAD="https://files.pythonhosted.org/packages/06/b1/9e491df2ee1c919d67ee328d8bc9f17b7a9af68e4077f3f5fac83a4488c9/humanize-4.6.0.tar.gz"
+MD5SUM="17dd6c0415a34c0478d5c849560276bb"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-build python3-installer wheel python3-hatchling python3-hatch_vcs"
+MAINTAINER="Tonus"
+EMAIL="tonus1@free.fr"
diff --git a/python/humanize/slack-desc b/python/humanize/slack-desc
new file mode 100644
index 0000000000..f7605066ee
--- /dev/null
+++ b/python/humanize/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------------------------------------------------------|
+humanize: humanize (various common humanization utilities)
+humanize:
+humanize: This modest package contains various common humanization utilities,
+humanize: like turning a number into a fuzzy human-readable duration
+humanize: ("3 minutes ago") or into a human-readable size or throughput.
+humanize:
+humanize: It is localized to at least 27 languages.
+humanize:
+humanize:
+humanize:
+humanize: