diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-11-24 08:56:55 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-11-24 08:56:55 +0700 |
commit | 0d9322952480b789da3611a85a3fcbcc995ebed6 (patch) | |
tree | 86564ea33e9845a6477812474fc1b24a8dbe183a | |
parent | 8e00b44912be8036bb35260b91843a38faa72409 (diff) |
python-template: Add python3 support.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | python-template.SlackBuild | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python-template.SlackBuild b/python-template.SlackBuild index 0472cd6..1381382 100644 --- a/python-template.SlackBuild +++ b/python-template.SlackBuild @@ -97,15 +97,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Your application may need different options; this is only an example +# Your application may need different options; this is only an example 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 + # Strip binaries and libraries. 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 # Compress man pages -# If the man pages are installed to /usr/share/man instead, you'll need to +# If the man pages are installed to /usr/share/man instead, you'll need to # move them manually. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done |