From d6d721ab092c9350c189ea88e3c583932423b506 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 26 Nov 2016 11:39:08 +0200 Subject: libraries/pycparser: Add python3 support. Signed-off-by: Dimitris Zlatanidis Signed-off-by: Willy Sudiarto Raharjo --- libraries/pycparser/README | 2 ++ libraries/pycparser/pycparser.SlackBuild | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'libraries/pycparser') 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 -- cgit v1.2.3