summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author~red <74621759+RSKYS@users.noreply.github.com>2021-10-19 22:17:40 +0330
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-22 13:02:33 +0700
commit9eb284a07388bb7b1ff6ebcb34f4a629dc03a804 (patch)
tree4dbdfef70eeb862c247e6cefaff06e847695857e
parenta50ce33bc90492e9c38d98db5effdd1dc06808a4 (diff)
downloadslackbuilds-9eb284a07388bb7b1ff6ebcb34f4a629dc03a804.tar.gz
python/python3-natsort: Added (Python Sorting Library)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--python/python3-natsort/README1
-rw-r--r--python/python3-natsort/python3-natsort.SlackBuild102
-rw-r--r--python/python3-natsort/python3-natsort.info10
-rw-r--r--python/python3-natsort/slack-desc19
4 files changed, 132 insertions, 0 deletions
diff --git a/python/python3-natsort/README b/python/python3-natsort/README
new file mode 100644
index 0000000000..c726168fab
--- /dev/null
+++ b/python/python3-natsort/README
@@ -0,0 +1 @@
+Simple yet flexible natural sorting in Python.
diff --git a/python/python3-natsort/python3-natsort.SlackBuild b/python/python3-natsort/python3-natsort.SlackBuild
new file mode 100644
index 0000000000..203f04b425
--- /dev/null
+++ b/python/python3-natsort/python3-natsort.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+# Slackware build script for python3-natsort
+
+# Copyright 2019-2021 Pouria Rezaei <Pouria.rz@outlook.com>
+# 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-natsort
+SRCNAM=natsort
+VERSION=${VERSION:-7.1.1}
+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 $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 {} \;
+
+sed -i -e "s~.*scripts=glob.glob(\"Scripts/\*.py\"),~~" setup.py
+
+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
+
+PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
+# Install documentation.
+mkdir -p $PRGDOC
+cat $CWD/README > $PRGDOC/README
+cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$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-natsort/python3-natsort.info b/python/python3-natsort/python3-natsort.info
new file mode 100644
index 0000000000..b34df8a436
--- /dev/null
+++ b/python/python3-natsort/python3-natsort.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-natsort"
+VERSION="7.1.1"
+HOMEPAGE="https://github.com/SethMMorton/natsort"
+DOWNLOAD="https://files.pythonhosted.org/packages/06/73/132e1986f7d37826e39825097e09f2c86b1339609926210ebdaec74a3b72/natsort-7.1.1.tar.gz"
+MD5SUM="585f58381542884f2cc9c4d73962a08f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Pouria Rezaei"
+EMAIL="Pouria.rz@outlook.com"
diff --git a/python/python3-natsort/slack-desc b/python/python3-natsort/slack-desc
new file mode 100644
index 0000000000..27c549659e
--- /dev/null
+++ b/python/python3-natsort/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-natsort: python3-natsort (Simple and flexible sorting in Python)
+python3-natsort:
+python3-natsort: Simple yet flexible natural sorting in Python.
+python3-natsort:
+python3-natsort: https://github.com/SethMMorton/natsort
+python3-natsort:
+python3-natsort:
+python3-natsort:
+python3-natsort:
+python3-natsort:
+python3-natsort: