aboutsummaryrefslogtreecommitdiff
path: root/python/wcwidth
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2019-10-26 18:02:00 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-10-27 00:36:10 +0700
commitc6a4d6239e19170b92c4bce5a7504267cafb38f2 (patch)
tree3aadb90145ee82a95551ef54818798e6c915c0e9 /python/wcwidth
parent8adad3a8a6f5271070ae746a707e3825af82193a (diff)
python/wcwidth: Added python3 support.
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
Diffstat (limited to 'python/wcwidth')
-rw-r--r--python/wcwidth/README2
-rw-r--r--python/wcwidth/wcwidth.SlackBuild9
2 files changed, 9 insertions, 2 deletions
diff --git a/python/wcwidth/README b/python/wcwidth/README
index 3d43838d0aed..102a1f775c74 100644
--- a/python/wcwidth/README
+++ b/python/wcwidth/README
@@ -2,3 +2,5 @@ This API is mainly for Terminal Emulator implementors - any
python program that attempts to determine the printable width of
a string on a Terminal. It is implemented in python (no C library
calls) and has no 3rd-party dependencies.
+
+Optional dependency: python3
diff --git a/python/wcwidth/wcwidth.SlackBuild b/python/wcwidth/wcwidth.SlackBuild
index d05cd85a3f02..b1b44e277243 100644
--- a/python/wcwidth/wcwidth.SlackBuild
+++ b/python/wcwidth/wcwidth.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for wcwidth
-# Copyright 2015-2016 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2015-2019 Dimitris Zlatanidis Orestiada, Greece
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=wcwidth
VERSION=${VERSION:-0.1.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,6 +71,11 @@ 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
+
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