Hi,
attached a stack of patches fixing some minor issues and adding python3
packages for pyzmq.
Please consider applying them to the repository, or allow me to do so.

Regards,
Julian Taylor
From ebd4f19c978b8a0ee79d7cf1cad47e559d0c1c7c Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.deb...@googlemail.com>
Date: Sun, 4 Dec 2011 16:48:25 +0100
Subject: [PATCH 1/4] * remove python:Provides, python:Breaks and
 XB-Python-Version   not needed with dh_python2 * bump
 python dependency to >= 2.6.6-3~ for dh_python2

---
 debian/changelog |    9 +++++++++
 debian/control   |    6 +-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fcb41b5..9d155cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+pyzmq (2.1.10-2) UNRELEASED; urgency=low
+
+  * remove python:Provides, python:Breaks and XB-Python-Version
+    not needed with dh_python2
+  * bump python dependency to >= 2.6.6-3~ for dh_python2
+
+
+ -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 16:43:30 +0100
+
 pyzmq (2.1.10-1) unstable; urgency=low
 
   * New upstream version
diff --git a/debian/control b/debian/control
index 6d4f15d..bcb5bbb 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-t...@lists.alioth.debian.org>
 Uploaders: Miguel Landaeta <mig...@miguel.cc>
 Build-Depends: debhelper (>= 7.0.50~),
- python-all-dev (>= 2.4), python-all-dbg (>= 2.4), python-setuptools, cython-dbg (>= 0.13),
+ python-all-dev (>= 2.6.6-3~), python-all-dbg (>= 2.4), python-setuptools, cython-dbg (>= 0.13),
  libzmq-dev (>= 2.1.10), libzmq-dev (<= 2.1.11)
 Standards-Version: 3.9.2
 X-Python-Version: >= 2.4
@@ -15,9 +15,6 @@ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyzmq/trunk/
 Package: python-zmq
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
-Provides: ${python:Provides}
-Breaks: ${python:Breaks}
-XB-Python-Version: ${python:Versions}
 Description: Python bindings for 0MQ library
  Python bindings for 0MQ. 0MQ is a small, fast, and free
  software library that gives you message-passing concurrency
@@ -38,7 +35,6 @@ Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends},
  python-zmq (= ${binary:Version})
 Recommends: python-dbg
-Breaks: ${python:Breaks}
 Description: Python bindings for 0MQ library - debugging files
  Python bindings for 0MQ. 0MQ is a small, fast, and free
  software library that gives you message-passing concurrency
-- 
1.7.5.4

From 7dda37f108183545cbe44ac70733a75ec5c52441 Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.deb...@googlemail.com>
Date: Sun, 4 Dec 2011 16:49:56 +0100
Subject: [PATCH 2/4] * do not delete *_d.so files from lib/debug in
 python-zmq-dbg   - needed for gdb when using debug
 interpreter

---
 debian/changelog |    5 +++--
 debian/rules     |    1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9d155cb..2f572fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,9 +3,10 @@ pyzmq (2.1.10-2) UNRELEASED; urgency=low
   * remove python:Provides, python:Breaks and XB-Python-Version
     not needed with dh_python2
   * bump python dependency to >= 2.6.6-3~ for dh_python2
+  * do not delete *_d.so files from lib/debug in python-zmq-dbg
+    - needed for gdb when using debug interpreter
 
-
- -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 16:43:30 +0100
+ -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 16:48:54 +0100
 
 pyzmq (2.1.10-1) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index 03edf3e..4d21a0b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,6 @@ endif
 override_dh_strip:
 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
 	dh_strip --dbg-package=python-zmq-dbg
-	find debian/python-zmq-dbg/usr/lib/debug -name '*_d.so' -delete
 endif
 
 get-orig-source:
-- 
1.7.5.4

From 7f02cc7a3555b55d97c96655f609cff72cb6e9fe Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.deb...@googlemail.com>
Date: Sun, 4 Dec 2011 16:57:42 +0100
Subject: [PATCH 3/4] * fix dep5 copyright syntax error

---
 debian/changelog |    1 +
 debian/copyright |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2f572fe..5a8727e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ pyzmq (2.1.10-2) UNRELEASED; urgency=low
   * bump python dependency to >= 2.6.6-3~ for dh_python2
   * do not delete *_d.so files from lib/debug in python-zmq-dbg
     - needed for gdb when using debug interpreter
+  * fix dep5 copyright syntax error
 
  -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 16:48:54 +0100
 
diff --git a/debian/copyright b/debian/copyright
index 1f34496..95bff92 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -14,7 +14,7 @@ Files: perf/*
 Copyright: © 2007-2010, iMatix Corporation.
 License: LGPL-3
 
-Files: zmq/eventloop/zmqstream.py,
+Files: zmq/eventloop/zmqstream.py
  zmq/eventloop/ioloop.py
 Copyright: © 2009, Facebook.
 License: Apache-2.0
-- 
1.7.5.4

From 23ec2467d922ca6b3e9036e1580b349712f934ae Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.deb...@googlemail.com>
Date: Sun, 4 Dec 2011 16:52:05 +0100
Subject: [PATCH 4/4] * add python3 packages (Closes: #636484)

---
 debian/changelog |    3 ++-
 debian/control   |   47 ++++++++++++++++++++++++++++++++++++++++++++---
 debian/rules     |   42 ++++++++++++++++++++++++++++++++++++++----
 3 files changed, 84 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5a8727e..65a7ad3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ pyzmq (2.1.10-2) UNRELEASED; urgency=low
   * do not delete *_d.so files from lib/debug in python-zmq-dbg
     - needed for gdb when using debug interpreter
   * fix dep5 copyright syntax error
+  * add python3 packages (Closes: #636484) 
 
- -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 16:48:54 +0100
+ -- Julian Taylor <jtaylor.deb...@googlemail.com>  Sun, 04 Dec 2011 17:06:13 +0100
 
 pyzmq (2.1.10-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index bcb5bbb..0587ebd 100644
--- a/debian/control
+++ b/debian/control
@@ -5,9 +5,10 @@ Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.
 Uploaders: Miguel Landaeta <mig...@miguel.cc>
 Build-Depends: debhelper (>= 7.0.50~),
  python-all-dev (>= 2.6.6-3~), python-all-dbg (>= 2.4), python-setuptools, cython-dbg (>= 0.13),
- libzmq-dev (>= 2.1.10), libzmq-dev (<= 2.1.11)
+ libzmq-dev (>= 2.1.10), libzmq-dev (<= 2.1.11), python3-all-dev (>= 3.2), python3-all-dbg (>= 3.2)
 Standards-Version: 3.9.2
 X-Python-Version: >= 2.4
+X-Python3-Version: >= 3.2
 Homepage: http://www.zeromq.org/bindings:python
 Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/pyzmq/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyzmq/trunk/
@@ -26,7 +27,7 @@ Description: Python bindings for 0MQ library
  products. 0MQ sockets provide an abstraction of asynchronous
  message queues, multiple messaging patterns, message
  filtering (subscriptions), seamless access to multiple
- transport protocols and more. 
+ transport protocols and more.
  
 Package: python-zmq-dbg
 Section: debug
@@ -46,6 +47,46 @@ Description: Python bindings for 0MQ library - debugging files
  products. 0MQ sockets provide an abstraction of asynchronous
  message queues, multiple messaging patterns, message
  filtering (subscriptions), seamless access to multiple
- transport protocols and more. 
+ transport protocols and more.
  .
  This package contains the extension built for the Python debug interpreter.
+
+Package: python3-zmq
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}
+Description: Python bindings for 0MQ library
+ Python bindings for 0MQ. 0MQ is a small, fast, and free
+ software library that gives you message-passing concurrency
+ for applications in most common languages.
+ .
+ The 0MQ lightweight messaging kernel is a library which
+ extends the standard socket interfaces with features
+ traditionally provided by specialised messaging middleware
+ products. 0MQ sockets provide an abstraction of asynchronous
+ message queues, multiple messaging patterns, message
+ filtering (subscriptions), seamless access to multiple
+ transport protocols and more.
+ .
+ This package contains the extension built for the Python3 interpreter.
+
+Package: python3-zmq-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends},
+ python3-zmq (= ${binary:Version})
+Recommends: python-dbg
+Description: Python bindings for 0MQ library - debugging files
+ Python bindings for 0MQ. 0MQ is a small, fast, and free
+ software library that gives you message-passing concurrency
+ for applications in most common languages.
+ .
+ The 0MQ lightweight messaging kernel is a library which
+ extends the standard socket interfaces with features
+ traditionally provided by specialised messaging middleware
+ products. 0MQ sockets provide an abstraction of asynchronous
+ message queues, multiple messaging patterns, message
+ filtering (subscriptions), seamless access to multiple
+ transport protocols and more.
+ .
+ This package contains the extension built for the Python3 debug interpreter.
diff --git a/debian/rules b/debian/rules
index 4d21a0b..719b4b3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,18 @@
 #!/usr/bin/make -f
+
+PY3VERS = $(shell py3versions -rv)
+
 %:
-	dh $@ --with python2
+	dh $@ --with python2,python3
+
+override_dh_auto_build:
+	dh_auto_build
+	set -e && for pyv in $(PY3VERS); do \
+	  python$$pyvers setup.py build ; \
+	done
+	set -e && for pyv in $(PY3VERS); do \
+	  python$${pyv}-dbg setup.py build ; \
+	done
 
 override_dh_auto_clean:
 	-dh_auto_clean
@@ -10,10 +22,23 @@ override_dh_auto_clean:
 
 override_dh_install:
 	# Install everything excluding the *_d.so debug extensions to python-zmq
-	dh_install -X"*_d.so" "debian/tmp/*" -p python-zmq
+	dh_install -X"*_d.so" "debian/tmp/usr/lib/python2.*" -p python-zmq
 
 	# Install the debug extensions to python-zmq-dbg
-	dh_install "usr/lib/python*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
+	dh_install "usr/lib/python2.*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
+
+	# Install python3 files
+	set -e && for pyv in $(PY3VERS); do \
+	  python$$pyv setup.py install --install-layout=deb \
+		--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq; \
+	done
+	set -e && for pyv in $(PY3VERS); do \
+	  python$${pyv}-dbg setup.py install --install-layout=deb \
+		--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq-dbg; \
+	done
+	# remove a couple of header files already in python3-zmq
+	find debian/python3-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
+
 
 	# Continue with regular dh_install
 	dh_install
@@ -28,11 +53,20 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 			$$python$$build setup.py test; \
 		done; \
 	done
+	set -e; \
+	for python in $(PY3VERS); do \
+		for build in \  -dbg; do \
+			find zmq -name '*.so' -delete; \
+			python$$python$$build setup.py build_ext --inplace; \
+			python$$python$$build setup.py test; \
+		done; \
+	done
 endif
 
 override_dh_strip:
 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
-	dh_strip --dbg-package=python-zmq-dbg
+	dh_strip -Xpython3 --dbg-package=python-zmq-dbg
+	dh_strip -X"python2.*" --dbg-package=python3-zmq-dbg
 endif
 
 get-orig-source:
-- 
1.7.5.4

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to