Package: libfiu
Version: 0.91-1
Severity: normal
Tags: patch

Based on having python3-dev in the build-depends for the package, I believe
you intended to provide support for python3 bindings, but as packaged, such
support is not provided.  Please see the attached patch.

Additionally, if you wish to replace the use of python-support, which is
deprecated in favor of dh_python2, with dh_python2 all you need to do on top
of the patch is to change --with python3 to --with python2,python3 and remove
the build-depends on python-support.
diff -Nru libfiu-0.91/debian/changelog libfiu-0.91/debian/changelog
--- libfiu-0.91/debian/changelog	2012-09-05 21:29:36.000000000 -0400
+++ libfiu-0.91/debian/changelog	2013-05-22 19:05:20.000000000 -0400
@@ -1,3 +1,13 @@
+libfiu (0.91-2) UNRELEASED; urgency=low
+
+  * Add support for python3
+    - Add python3-fiu binary to debian/control
+    - Adjust debian/rules to build for all versions
+    - Change python/python3 build deps to python{3}-all-dev to support build
+      for all versions
+
+ -- Scott Kitterman <[email protected]>  Wed, 22 May 2013 19:03:32 -0400
+
 libfiu (0.91-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru libfiu-0.91/debian/control libfiu-0.91/debian/control
--- libfiu-0.91/debian/control	2012-09-05 21:29:36.000000000 -0400
+++ libfiu-0.91/debian/control	2013-05-22 18:56:05.000000000 -0400
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: Chris Lamb <[email protected]>
-Build-Depends: debhelper (>= 7.0.50~), python-dev, python-docutils, python-support, python3-dev
+Build-Depends: debhelper (>= 7.0.50~), python-all-dev, python-docutils, python-support, python3-all-dev
 Standards-Version: 3.9.2
 Homepage: http://blitiri.com.ar/p/libfiu/
 Vcs-Git: git://github.com/lamby/pkg-libfiu.git
@@ -52,3 +52,14 @@
  enable/disable the failure of those points (the "control API").
  .
  This package contains Python bindings to libfiu.
+
+Package: python3-fiu
+Section: python
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, libfiu0 (= ${binary:Version})
+Description: userspace fault injection framework (Python 3 bindings)
+ libfiu is a C library for fault injection. It provides functions to mark
+ "points of failure" inside your code (the "core API"), and functions to
+ enable/disable the failure of those points (the "control API").
+ .
+ This package contains Python 3 bindings to libfiu.
diff -Nru libfiu-0.91/debian/rules libfiu-0.91/debian/rules
--- libfiu-0.91/debian/rules	2012-09-05 21:29:36.000000000 -0400
+++ libfiu-0.91/debian/rules	2013-05-22 19:11:23.000000000 -0400
@@ -1,9 +1,11 @@
 #!/usr/bin/make -f
 
 DOCS = $(patsubst %.rst,%.html, $(wildcard doc/*.rst))
+buildvers := $(shell pyversions -sv)
+build3vers := $(shell py3versions -sv)
 
 %:
-	dh $@
+	dh $@ --with python3
 
 clean:
 	rm -f doc/*.html
@@ -16,11 +18,25 @@
 	
 override_dh_auto_build: $(DOCS)
 	dh_auto_build
-	cd bindings/python && python setup.py build
+	cd bindings/python \
+	set -e && for i in $(buildvers); do \
+	  python$$i ./setup.py build; \
+	done
+	cd bindings/python \
+	set -e && for i in $(build3vers); do \
+	  python$$i ./setup.py build; \
+	done
 
 override_dh_auto_install:
 	make install PREFIX=$(CURDIR)/debian/tmp/usr DESTDIR=/usr PLIBPATH=/usr/lib/fiu
-	cd bindings/python && python setup.py install --root=$(CURDIR)/debian/python-fiu --no-compile -O0 --install-layout=deb
+	cd bindings/python \
+	set -e && for i in $(buildvers); do \
+	  python$$i ./setup.py install --root=$(CURDIR)/debian/python-fiu --no-compile -O0 --install-layout=deb; \
+	done
+	cd bindings/python \
+	set -e && for i in $(build3vers); do \
+	  python$$i ./setup.py install --root=$(CURDIR)/debian/python3-fiu --no-compile -O0 --install-layout=deb; \
+	done
 
 override_dh_compress:
 	dh_compress -X.rst

Reply via email to