[Pkg-bluetooth-maintainers] Bug#787850: [PATCH] Build python3 package

David Lechner david at lechnology.com
Wed Sep 28 21:34:01 UTC 2016


---

Here is a patch for python 3 support. However there is another bug that the 0.22 debian
package uses upstream 0.18 and python3 support doesn't really work until upstream 0.21.

  debian/control | 19 ++++++++++++++++++-
  debian/rules   |  9 +++++++--
  2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index bdead3a..d4f8461 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,13 @@ Section: python
  Priority: optional
  Maintainer: Debian Bluetooth Maintainers <pkg-bluetooth-maintainers at lists.alioth.debian.org>
  Uploaders: Albert Huang <albert at csail.mit.edu>
-Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.6.6-3~), libbluetooth-dev
+Build-Depends: debhelper (>= 5.0.37.2)
+ , dh-python
+ , python-all-dev (>= 2.6.6-3~)
+ , python-setuptools
+ , python3-all-dev
+ , python3-setuptools
+ , libbluetooth-dev
  Vcs-Svn: svn://svn.debian.org/pkg-bluetooth/packages/pybluez/trunk
  Vcs-Browser: http://svn.debian.org/wsvn/pkg-bluetooth/packages/pybluez/trunk
  Homepage: https://karulis.github.io/pybluez/
@@ -19,3 +25,14 @@ Description: Python wrappers around BlueZ for rapid bluetooth development
   running the GNU/Linux operating system and the bluez bluetooth stack.
   .
   This package provides the "bluetooth" Python module.
+
+Package: python3-bluez
+Architecture: any
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Provides: python-bluetooth, ${python3:Provides}
+Description: Python wrappers around BlueZ for rapid bluetooth development
+ PyBluez is an effort to create Python wrappers around BlueZ to allow Python
+ developers to use system bluetooth resources. PyBluez works on machines
+ running the GNU/Linux operating system and the bluez bluetooth stack.
+ .
+ This package provides the "bluetooth" Python 3 module.
diff --git a/debian/rules b/debian/rules
index b6ffd3f..0fbdac6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,7 @@
  #export DH_VERBOSE=1
  
  PYVERS=$(shell pyversions -r debian/control)
+PY3VERS=$(shell py3versions -r debian/control)
  
  CFLAGS = -Wall -g
  
@@ -27,7 +28,7 @@ build-indep: build-stamp
  
  build-stamp:
  	dh_testdir
-	for python in $(PYVERS); do \
+	for python in $(PYVERS) $(PY3VERS); do \
  	  $$python setup.py build; \
  	done
  	touch build-stamp
@@ -37,7 +38,7 @@ clean:
  	dh_testroot
  	-rm -f build-stamp
  
-	for python in $(PYVERS); do \
+	for python in $(PYVERS) $(PY3VERS); do \
  	  $$python setup.py clean; \
  	done
  
@@ -59,12 +60,16 @@ binary-arch: build install
  	for python in $(PYVERS); do \
  	  $$python setup.py install --root=debian/python-bluez; \
  	done
+	for python in $(PY3VERS); do \
+	  $$python setup.py install --root=debian/python3-bluez; \
+	done
  
  	dh_installdocs
  	dh_strip
  	dh_compress
  	dh_fixperms
  	dh_python2
+	dh_python3
  	dh_installdeb
  	dh_shlibdeps
  	dh_gencontrol



More information about the Pkg-bluetooth-maintainers mailing list