summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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