diff options
author | Dimitris Zlatanidis <d.zlatanidis@gmail.com> | 2016-11-26 11:39:08 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-03 07:21:38 +0700 |
commit | d6d721ab092c9350c189ea88e3c583932423b506 (patch) | |
tree | d402b3c5735797cda69cdd421cca41b5fcae69ab | |
parent | 4a82baeb1634aebce8d60518acc7b8691b735ffc (diff) | |
download | slackbuilds-d6d721ab092c9350c189ea88e3c583932423b506.tar.gz |
libraries/pycparser: Add python3 support.
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | libraries/pycparser/README | 2 | ||||
-rw-r--r-- | libraries/pycparser/pycparser.SlackBuild | 5 |
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 |