python/thonny: Change install localtion.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Tim Dickson 2021-02-12 22:57:59 +00:00 committed by Willy Sudiarto Raharjo
parent ab3bdf6f00
commit e584700ba7
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 13 additions and 5 deletions

View File

@ -44,13 +44,21 @@
#3.3.2 14 Jan 2021. version bump.
#3.3.3 27 Jan 2021. version bump.
#note. get download link from https://pypi.org/project/thonny/#files
#build2 10 Feb 2021. move install location to allow a plugin to work.
#thanks to chrisw. changed build arch as install is arch specific now.
PRGNAM=thonny
VERSION=${VERSION:-3.3.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
ARCH=noarch
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
@ -65,6 +73,8 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xzf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
#patch to remove mypy warning. thanks to chrisw
sed -i -e 's/logger.warning("MyPy: " + "".join(err_lines))/pass/' thonny/plugins/mypy/__init__.py
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@ -72,9 +82,7 @@ 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 {} \;
install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/opt/$PRGNAM
cp -r $PRGNAM $PKG/opt/
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/share/applications
cp -a packaging/linux/org.thonny.Thonny.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps