Package: src:babeltrace
Version: 1.2.1-2
Tags: patch
Severity: wishlist

Please enable python3 bindings in the babeltrace package. Patch
attached.

Sebastian
>From 52db172006200d97e3da7e3b87d1f29af0a44449 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
Date: Tue, 27 May 2014 10:45:20 +0200
Subject: [PATCH] enable build of the python3 bindings

It does not work with python2 at all (it compiles but this is it). The
readme says that python3.0+ is required. Therefore I specified the
python intepreter and config in the configure run instead of using a
build-conflict on python2.7, 2.6 and so on.

Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
---
 debian/control                    | 15 ++++++++++++++-
 debian/python3-babeltrace.install |  1 +
 debian/rules                      |  5 ++++-
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 debian/python3-babeltrace.install

diff --git a/debian/control b/debian/control
index 68fc9f8..9101c0c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: libs
 Priority: extra
 Maintainer: Jon Bernard <jbern...@debian.org>
 Build-Depends: debhelper (>= 9~), libglib2.0-dev (>= 2.16), uuid-dev,
- libpopt-dev, dh-autoreconf
+ libpopt-dev, dh-autoreconf, python3-dev, swig
+X-Python3-Version: >= 3.0
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/collab-maint/babeltrace.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/babeltrace.git;a=summary
@@ -75,3 +76,15 @@ Description: Common Trace Format (CTF) development files
  .
  This package provides the development headers to link applications directly
  against libbabeltrace-ctf.
+
+Package: python3-babeltrace
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
+Description: Babeltrace conversion libraries
+ Babeltrace provides trace reading and writing libraries, as well as a trace
+ converter. Plugins can be created for any trace format to allow its conversion
+ to/from any other supported format.
+ .
+ This package provides the python bindings for babeltrace.
diff --git a/debian/python3-babeltrace.install b/debian/python3-babeltrace.install
new file mode 100644
index 0000000..4606faa
--- /dev/null
+++ b/debian/python3-babeltrace.install
@@ -0,0 +1 @@
+usr/lib/python3*
diff --git a/debian/rules b/debian/rules
index 47b025c..bd0aae3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,10 @@
 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 
 %:
-	dh $@  --with autoreconf
+	dh $@  --with autoreconf --with python3
+
+override_dh_auto_configure:
+	PYTHON=python3 PYTHON_CONFIG=/usr/bin/python3-config dh_auto_configure -- --enable-python-bindings
 
 override_dh_auto_build:
 	dh_auto_build -- V=1
-- 
2.0.0.rc4

Reply via email to