summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2018-11-17 19:58:49 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-11-24 12:35:41 +0700
commite7dbb51ce4307aa2dd1b6df40f50199ae8f305c9 (patch)
treea92c2660d696df5c45c6391e201101c75178bb17 /python
parenteb457faf1b55c6dca39668713f0c440e20462d01 (diff)
downloadslackbuilds-e7dbb51ce4307aa2dd1b6df40f50199ae8f305c9.tar.gz
python/parhlib2: Add support for python3.
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
Diffstat (limited to 'python')
-rw-r--r--python/pathlib2/README2
-rw-r--r--python/pathlib2/pathlib2.SlackBuild5
2 files changed, 7 insertions, 0 deletions
diff --git a/python/pathlib2/README b/python/pathlib2/README
index 8630108f29..475b754080 100644
--- a/python/pathlib2/README
+++ b/python/pathlib2/README
@@ -2,3 +2,5 @@ The old pathlib module on bitbucket is in bugfix-only mode. The goal of
pathlib2 is to provide a backport of standard pathlib module which tracks the
standard library module, so all the newest features of the standard pathlib
can be used also on older Python versions.
+
+Optional dependency: python3
diff --git a/python/pathlib2/pathlib2.SlackBuild b/python/pathlib2/pathlib2.SlackBuild
index 4a9b055dd4..82ca2635bd 100644
--- a/python/pathlib2/pathlib2.SlackBuild
+++ b/python/pathlib2/pathlib2.SlackBuild
@@ -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