From e48c5df4d7200807fcd01ffbc5f0cd410cc3bf96 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sat, 9 Mar 2019 20:35:55 -0600 Subject: python/pyusb: Add optional python3 support. Signed-off-by: Kyle Guinn --- python/pyusb/pyusb.SlackBuild | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/pyusb/pyusb.SlackBuild b/python/pyusb/pyusb.SlackBuild index 0ee6f6c24b..e8a591e571 100644 --- a/python/pyusb/pyusb.SlackBuild +++ b/python/pyusb/pyusb.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for PyUSB -# Copyright 2014-2017 Kyle Guinn , USA +# Copyright 2014-2019 Kyle Guinn # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ PRGNAM=pyusb VERSION=${VERSION:-1.0.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -48,12 +48,16 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go-w,a+rX-st . -python ./setup.py install --root=$PKG +python2 ./setup.py install --root=$PKG +if python3 -c 'import sys' 2>/dev/null; then + rm -rf build + python3 ./setup.py install --root=$PKG +fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -- cgit v1.2.3-80-g2a13