summaryrefslogtreecommitdiffstats
path: root/python/tzlocal
diff options
context:
space:
mode:
Diffstat (limited to 'python/tzlocal')
-rw-r--r--python/tzlocal/tzlocal.SlackBuild23
-rw-r--r--python/tzlocal/tzlocal.info6
2 files changed, 20 insertions, 9 deletions
diff --git a/python/tzlocal/tzlocal.SlackBuild b/python/tzlocal/tzlocal.SlackBuild
index 122697c81a..928c5c5d6c 100644
--- a/python/tzlocal/tzlocal.SlackBuild
+++ b/python/tzlocal/tzlocal.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for tzlocal
-# Copyright 2014-2017 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2014-2021 Dimitris Zlatanidis Orestiada, Greece
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# 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=tzlocal
-VERSION=${VERSION:-1.5.1}
+VERSION=${VERSION:-2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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}
@@ -69,7 +79,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root=$PKG
+python2 setup.py install --root=$PKG
+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
@@ -82,4 +93,4 @@ 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:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/python/tzlocal/tzlocal.info b/python/tzlocal/tzlocal.info
index 39288117b2..097b04014b 100644
--- a/python/tzlocal/tzlocal.info
+++ b/python/tzlocal/tzlocal.info
@@ -1,8 +1,8 @@
PRGNAM="tzlocal"
-VERSION="1.5.1"
+VERSION="2.1"
HOMEPAGE="https://github.com/regebro/tzlocal"
-DOWNLOAD="https://pypi.python.org/packages/cb/89/e3687d3ed99bc882793f82634e9824e62499fdfdc4b1ae39e211c5b05017/tzlocal-1.5.1.tar.gz"
-MD5SUM="4553be891efa0812c4adfb0c6e818eec"
+DOWNLOAD="https://files.pythonhosted.org/packages/ce/73/99e4cc30db6b21cba6c3b3b80cffc472cc5a0feaf79c290f01f1ac460710/tzlocal-2.1.tar.gz"
+MD5SUM="c0877603ff9de71cd8ca6ee2b50d2ebd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="pytz"