summaryrefslogtreecommitdiff
path: root/python/python-urllib3/python-urllib3.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/python-urllib3/python-urllib3.SlackBuild')
-rw-r--r--python/python-urllib3/python-urllib3.SlackBuild15
1 files changed, 9 insertions, 6 deletions
diff --git a/python/python-urllib3/python-urllib3.SlackBuild b/python/python-urllib3/python-urllib3.SlackBuild
index 58af51f7b0..f8263f655e 100644
--- a/python/python-urllib3/python-urllib3.SlackBuild
+++ b/python/python-urllib3/python-urllib3.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for python-urllib3
# Copyright 2013 Thibaut Notteboom, Paris, FRANCE
+# Copyright 2014 Dimitris Zlatanidis Greece-Orestiada
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +24,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=python-urllib3
-VERSION=${VERSION:-1.7.1}
+SRCNAM=$(echo $PRGNAM | cut -c8-14)
+VERSION=${VERSION:-1.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCNAM=urllib3
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -73,10 +73,13 @@ find -L . \
python setup.py install --root=$PKG
+# Python 3 support.
+if $(python3 -c 'import sys' 2>/dev/null); then
+ python3 setup.py install --root=$PKG
+fi
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- CHANGES.rst CONTRIBUTORS.txt LICENSE.txt MANIFEST.in PKG-INFO README.rst \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.rst *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install