aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2021-09-26 18:10:31 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-02 16:50:37 +0700
commit1cfec65b292db50843c2dbbaf963b46f61b18aa6 (patch)
treec984c7506060b68cc28956a787e3a4c86170c435 /python
parent06e212e5393c8fa91836755f6546ab51576d7c96 (diff)
python/pybluez: Updated for version 0.23
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r--python/pybluez/pybluez-2to3.patch21
-rw-r--r--python/pybluez/pybluez.SlackBuild21
-rw-r--r--python/pybluez/pybluez.info8
3 files changed, 40 insertions, 10 deletions
diff --git a/python/pybluez/pybluez-2to3.patch b/python/pybluez/pybluez-2to3.patch
new file mode 100644
index 000000000000..e15309db44e3
--- /dev/null
+++ b/python/pybluez/pybluez-2to3.patch
@@ -0,0 +1,21 @@
+From 64ca3fd1568e56f2d0e1fe992f3a0f5ba57ea694 Mon Sep 17 00:00:00 2001
+From: Stephen Abraham <stephenabraham@tophatorbotics.com>
+Date: Mon, 13 Sep 2021 16:22:46 -0400
+Subject: [PATCH] Removed 2to3 command
+
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c9de5c9..6a80b4e 100755
+--- a/setup.py
++++ b/setup.py
+@@ -127,7 +127,6 @@ def finalize_options(self):
+ license='GPL',
+ extras_require={'ble': ['gattlib']},
+ package_dir=package_dir,
+- use_2to3=True,
+ install_requires=install_requires,
+ package_data=package_data,
+ eager_resources=eager_resources,
diff --git a/python/pybluez/pybluez.SlackBuild b/python/pybluez/pybluez.SlackBuild
index 30ed237ff26d..c04a9efc51a8 100644
--- a/python/pybluez/pybluez.SlackBuild
+++ b/python/pybluez/pybluez.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for pybluez
-# Copyright 2009-2017 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2009-2021 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pybluez
-VERSION=${VERSION:-0.22}
+SRCNAM=PyBluez
+VERSION=${VERSION:-0.23}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -66,9 +67,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -76,13 +77,21 @@ 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 {} \;
+# Don't use 2to3 support anymore
+patch -p1 -i $CWD/pybluez-2to3.patch
+
+python3 setup.py install --root=$PKG
+
+# Fix python2 support
+sed -i '50,$d' bluetooth/__init__.py
+
python2 setup.py install --root=$PKG
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG COPYING README README.rst $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGELOG COPYING README.md PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/python/pybluez/pybluez.info b/python/pybluez/pybluez.info
index b450445f9c0c..97070c4479a5 100644
--- a/python/pybluez/pybluez.info
+++ b/python/pybluez/pybluez.info
@@ -1,10 +1,10 @@
PRGNAM="pybluez"
-VERSION="0.22"
+VERSION="0.23"
HOMEPAGE="https://pybluez.github.io/"
-DOWNLOAD="https://github.com/karulis/pybluez/archive/0.22/pybluez-0.22.tar.gz"
-MD5SUM="06f71ca6d4216ace671d5e588ec85887"
+DOWNLOAD="https://files.pythonhosted.org/packages/08/9f/e9d93b266d2d1ea988780a52a696073ba0a65df65a532165fdf6ff90d0ed/PyBluez-0.23.tar.gz"
+MD5SUM="afbe8429bb82d2c46a3d0f5f4f898f9d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python2-gattlib"
+REQUIRES="python2-gattlib python3-gattlib"
MAINTAINER="Heinz Wiesinger"
EMAIL="pprkut@slackbuilds.org"