aboutsummaryrefslogtreecommitdiff
path: root/python/Pygments/Pygments.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/Pygments/Pygments.SlackBuild')
-rw-r--r--python/Pygments/Pygments.SlackBuild24
1 files changed, 7 insertions, 17 deletions
diff --git a/python/Pygments/Pygments.SlackBuild b/python/Pygments/Pygments.SlackBuild
index 793b64b80de9f..8b0b75f6b5aba 100644
--- a/python/Pygments/Pygments.SlackBuild
+++ b/python/Pygments/Pygments.SlackBuild
@@ -4,6 +4,7 @@
# Copyright 2009 Grissiom <chaos.proton@gmail.com>
# Copyright 2009-2015 LukenShiro, Italy
+# Copyright 2017-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=Pygments
-VERSION=${VERSION:-2.1.3}
+VERSION=${VERSION:-2.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,10 +42,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCFILES="LICENSE TODO AUTHORS CHANGES README.rst"
-# html documentation is not built by default
-HTML=${HTML:-0}
-
set -e
rm -rf $PKG
@@ -60,12 +57,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 --prefix=/usr --root=$PKG
-
-# Python 3 support.
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
+python2 setup.py install --prefix=/usr --root=$PKG
+python3 setup.py install --prefix=/usr --root=$PKG
mkdir -p $PKG/usr/man/man1
cp -a doc/pygmentize.1 $PKG/usr/man/man1
@@ -76,12 +69,9 @@ sed -i "s|share/doc/python-pygments|doc/${PRGNAM}-${VERSION}|" \
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-# building html documentation
-case "$HTML" in
- 0) ;;
- *) cd doc ; make html && cp -R _build/html $PKG/usr/doc/$PRGNAM-$VERSION ; cd - ;;
-esac
-cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE TODO AUTHORS CHANGES README.rst \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install