python/python-ipcalc: Added python 3 support.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Marcel Saegebarth 2015-01-27 00:22:32 +07:00 committed by Willy Sudiarto Raharjo
parent 57c0e90975
commit 9e1706fe73

View file

@ -27,7 +27,7 @@
PRGNAM=python-ipcalc
SRCNAM=ipcalc
VERSION=${VERSION:-1.1.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -74,9 +74,12 @@ find -L . \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
python setup.py build
python setup.py install --root $PKG
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