summaryrefslogtreecommitdiff
path: root/libraries/pycparser
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pycparser')
-rw-r--r--libraries/pycparser/README2
-rw-r--r--libraries/pycparser/pycparser.SlackBuild5
2 files changed, 7 insertions, 0 deletions
diff --git a/libraries/pycparser/README b/libraries/pycparser/README
index 65ad168ec5..024359f0ca 100644
--- a/libraries/pycparser/README
+++ b/libraries/pycparser/README
@@ -1,3 +1,5 @@
**pycparser** is a parser for the C language, written in pure Python. It is a
module designed to be easily integrated into applications that need to parse
C source code.
+
+Optional dependency: python3
diff --git a/libraries/pycparser/pycparser.SlackBuild b/libraries/pycparser/pycparser.SlackBuild
index 46ca1a3b7f..aa1e6329ea 100644
--- a/libraries/pycparser/pycparser.SlackBuild
+++ b/libraries/pycparser/pycparser.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