aboutsummaryrefslogtreecommitdiff
path: root/python/tempita
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2019-03-09 20:45:28 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-03-16 06:53:34 +0700
commit7801b80f7215dda499fa24df4dba8032f409e6c0 (patch)
tree5f135649ca733daff85686d5bec8fbafb039d056 /python/tempita
parente48c5df4d7200807fcd01ffbc5f0cd410cc3bf96 (diff)
python/tempita: Add optional python3 support.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'python/tempita')
-rw-r--r--python/tempita/tempita.SlackBuild12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/tempita/tempita.SlackBuild b/python/tempita/tempita.SlackBuild
index 4c97958d9ab8c..da9f4eec9e0b3 100644
--- a/python/tempita/tempita.SlackBuild
+++ b/python/tempita/tempita.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Tempita
-# Copyright 2014-2017 Kyle Guinn <elyk03@gmail.com>, USA
+# Copyright 2014-2019 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
PRGNAM=tempita
SRCNAM=Tempita
VERSION=${VERSION:-0.5.3dev}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -38,7 +38,7 @@ fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
+PKG=$TMP/package-$PRGNAM-$VERSION
OUTPUT=${OUTPUT:-/tmp}
set -e
@@ -52,7 +52,11 @@ cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
-python setup.py install --root=$PKG
+python2 ./setup.py install --root=$PKG
+if python3 -c 'import sys' 2>/dev/null; then
+ rm -rf build
+ python3 ./setup.py install --root=$PKG
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild