Finally, here is a diff that I've used to upload a new version to Ubuntu precise which includes the Python 3 packaging. Hopefully, you'll find it helpful for updating the Debian packaging; I'm interested in your feedback for this as well. I omitted the quilt patches and debian/changelong entry I used since they won't be relevant to Debian, or after you release the merged the `python3` branch.
This also enables the test suite during the build, since that works now in precise. Apologies for pasting the diff here. Bugzilla rejected my attachment and I can't log into it atm. === modified file 'debian/control' --- debian/control 2011-07-25 12:51:22 +0000 +++ debian/control 2012-01-12 15:45:43 +0000 @@ -1,22 +1,32 @@ Source: dbus-python Section: devel Priority: optional -Maintainer: Utopia Maintenance Team <[email protected]> +Maintainer: Ubuntu Developers <[email protected]> +XSBC-Original-Maintainer: Utopia Maintenance Team <[email protected]> Uploaders: Sjoerd Simons <[email protected]>, Sebastian Dröge <[email protected]>, Simon McVittie <[email protected]>, Loic Minier <[email protected]> -Build-Depends: debhelper (>= 8), - xmlto, - python-all-dev (>= 2.6.6-3~), - python-all-dbg (>= 2.6.6-3~), +Build-Depends: autoconf, + automake, + autotools-dev, + debhelper (>= 8), libdbus-1-dev (>= 1.4), libdbus-glib-1-dev (>= 0.71), - autotools-dev -Build-Depends-Indep: python-docutils, - python-epydoc (>= 3.0~beta1) + libtool, + python-all-dbg (>= 2.6.6-3~), + python-all-dev (>= 2.6.6-3~), + python-gobject, + python-gobject-dbg, + python3-all-dbg, + python3-all-dev, + python3-gobject, + python3-gobject-dbg, + xmlto +Build-Depends-Indep: python-docutils, python-epydoc (>= 3.0~beta1) Standards-Version: 3.9.2 -X-Python-Version: >= 2.4 +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 XS-Dm-Upload-Allowed: yes Homepage: http://www.freedesktop.org/wiki/Software/DBusBindings#Python Vcs-Git: git://anonscm.debian.org/git/pkg-utopia/dbus-python.git @@ -25,16 +35,12 @@ Package: python-dbus Section: python Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - ${python:Depends} +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} Recommends: python-gobject | python-gtk (<< 2.10) -Suggests: python-dbus-doc, python-dbus-dbg +Suggests: python-dbus-dbg, python-dbus-doc Replaces: python2.4-dbus Conflicts: python2.4-dbus -Breaks: gnome-osd (<< 0.12.0), - gajim (<< 0.11.1), - python-qt4-dbus (<< 4.8.3-3) +Breaks: gajim (<< 0.11.1), gnome-osd (<< 0.12.0), python-qt4-dbus (<< 4.8.3-3) Provides: ${python:Provides} Description: simple interprocess messaging system (Python interface) D-Bus is a message bus, used for sending messages between applications. @@ -45,11 +51,23 @@ . See the dbus description for more information about D-Bus in general. +Package: python-dbus-common +Section: python +Priority: extra +Architecture: any +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} +Description: Common files for dbus-python. +Conflicts: python-dbus (<< ${source:Version}) + Package: python-dbus-dbg Section: debug Priority: extra Architecture: any -Depends: python-dbus (= ${binary:Version}), python-dbg, ${shlibs:Depends}, ${misc:Depends} +Depends: python-dbg, + python-dbus (= ${binary:Version}), + python-dbus-common, + ${misc:Depends}, + ${shlibs:Depends} Description: Debug build of the D-Bus Python interface This package provides a version of the python-dbus package built for debugging versions of Python. @@ -62,3 +80,34 @@ Description: Documentation for the D-Bus Python interface This package provides text and HTML documentation, and examples, for the python-dbus package. + +Package: python3-dbus +Section: python +Architecture: any +Depends: python-dbus-common, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Recommends: python-gi +Suggests: python-dbus-dbg, python-dbus-doc +Provides: ${python:Provides} +Description: simple interprocess messaging system (Python interface) + D-Bus is a message bus, used for sending messages between applications. + Conceptually, it fits somewhere in between raw sockets and CORBA in + terms of complexity. + . + This package provides a Python interface to D-Bus. + . + See the dbus description for more information about D-Bus in general. + +Package: python3-dbus-dbg +Section: debug +Priority: extra +Architecture: any +Depends: python3-dbg, + python3-dbus (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: Debug build of the D-Bus Python interface + This package provides a version of the python-dbus package built for + debugging versions of Python. \ No newline at end of file === added file 'debian/python-dbus-common.install' --- debian/python-dbus-common.install 1970-01-01 00:00:00 +0000 +++ debian/python-dbus-common.install 2012-01-12 14:04:25 +0000 @@ -0,0 +1,2 @@ +debian/tmp/usr/include/* +debian/tmp/usr/lib/pkgconfig/* === added file 'debian/python-dbus-dbg.install' --- debian/python-dbus-dbg.install 1970-01-01 00:00:00 +0000 +++ debian/python-dbus-dbg.install 2012-01-12 14:04:25 +0000 @@ -0,0 +1,1 @@ +debian/python-dbus-2*-dbg/usr/lib/python2.*/*-packages/* === added file 'debian/python-dbus.install' --- debian/python-dbus.install 1970-01-01 00:00:00 +0000 +++ debian/python-dbus.install 2012-01-12 14:04:25 +0000 @@ -0,0 +1,1 @@ +debian/tmp/usr/lib/python2.*/*-packages/* === added file 'debian/python3-dbus-dbg.install' --- debian/python3-dbus-dbg.install 1970-01-01 00:00:00 +0000 +++ debian/python3-dbus-dbg.install 2012-01-12 14:04:25 +0000 @@ -0,0 +1,1 @@ +debian/python-dbus-3*-dbg/usr/lib/python3/*-packages/* === added file 'debian/python3-dbus.install' --- debian/python3-dbus.install 1970-01-01 00:00:00 +0000 +++ debian/python3-dbus.install 2012-01-12 14:04:25 +0000 @@ -0,0 +1,1 @@ +debian/tmp/usr/lib/python3/*-packages/* === modified file 'debian/rules' --- debian/rules 2011-07-25 12:51:22 +0000 +++ debian/rules 2012-01-12 15:51:20 +0000 @@ -3,6 +3,8 @@ # Copyright © 2003 Daniel Stone <[email protected]> # Copyright © 2006 Sjoerd Simons <[email protected]> +DH_VERBOSE=1 + # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -13,6 +15,9 @@ PYVERS := $(shell pyversions --requested --version debian/control) PYDEFAULTVER := $(shell pyversions --default --version) +PY3VERS := $(shell py3versions --requested --version debian/control) +PY3DEFAULTVER := $(shell py3versions --default --version) + ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CONFIGURE_FLAGS += --build=$(DEB_BUILD_GNU_TYPE) else @@ -47,6 +52,9 @@ build-%/build-stamp: build-%/configure-stamp dh_testdir PYTHON=/usr/bin/python$* $(MAKE) -C build-$* +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) -C build-$* check +endif touch $@ build-doc/build-doc-stamp: build-doc/configure-stamp @@ -56,7 +64,12 @@ build: build-arch #build: build-indep -build-arch: $(PYVERS:%=build-%/build-stamp) $(PYVERS:%=build-%-dbg/build-stamp) + +build-arch: $(PYVERS:%=build-%/build-stamp) \ + $(PYVERS:%=build-%-dbg/build-stamp) \ + $(PY3VERS:%=build-%/build-stamp) \ + $(PY3VERS:%=build-%-dbg/build-stamp) + build-indep: build-doc/build-doc-stamp install-clean: @@ -64,40 +77,40 @@ dh_testroot dh_prep -install-%: build-%/build-stamp +install-%: dh_testdir dh_testroot - $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/python-dbus + $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp # keep a copy of /usr/include/debian-python.h and # /usr/lib/pkgconfig/debian-python.pc to verify they match later - cp debian/python-dbus/usr/include/dbus-1.0/dbus/dbus-python.h debian/tmp-$*.h - cp debian/python-dbus/usr/lib/pkgconfig/dbus-python.pc debian/tmp-$*.pc + cp debian/tmp/usr/include/dbus-1.0/dbus/dbus-python.h debian/tmp-$*.h + cp debian/tmp/usr/lib/pkgconfig/dbus-python.pc debian/tmp-$*.pc -dbg-install-%: build-%-dbg/build-stamp +dbg-install-%: dh_testdir dh_testroot - $(MAKE) -C build-$*-dbg install DESTDIR=$(CURDIR)/debian/python-dbus-dbg - find debian/python-dbus-dbg ! -type d ! -name '*.so' -print0 | xargs -0 rm -f - find debian/python-dbus-dbg -depth -empty -exec rmdir {} \; + $(MAKE) -C build-$*-dbg install DESTDIR=$(CURDIR)/debian/python-dbus-$*-dbg + find debian/python-dbus-$*-dbg ! -type d ! -name '*.so' -print0 | xargs -0 rm -f + find debian/python-dbus-$*-dbg -depth -empty -exec rmdir {} \; + for i in $$(find debian/python-dbus-$*-dbg -name '*.so'); do \ + b=$$(basename $$i .so); \ + mv $$i $$(dirname $$i)/$${b}_d.so; \ + done -install-arch: build-arch install-clean $(PYVERS:%=install-%) $(PYVERS:%=dbg-install-%) - rm -f debian/python-dbus/usr/lib/python*/*-packages/*.la - rm -rf debian/python-dbus/usr/share/doc/deleteme - rm -f debian/python-dbus-dbg/usr/lib/python*/*-packages/*.la - rm -rf debian/python-dbus-dbg/usr/share/doc/deleteme +install-arch: build-arch install-clean \ + $(PYVERS:%=install-%) $(PYVERS:%=dbg-install-%) \ + $(PY3VERS:%=install-%) $(PY3VERS:%=dbg-install-%) + rm -f debian/tmp/usr/lib/python*/*-packages/*.la + rm -rf debian/tmp/usr/share/doc/deleteme # compare installed .pc and .h, asserting that the ones all versions # wanted are the same as what we ended up with - for v in $(PYVERS); do \ - diff --brief debian/python-dbus/usr/include/dbus-1.0/dbus/dbus-python.h \ + for v in $(PYVERS) $(PY3VERS); do \ + diff --brief debian/tmp/usr/include/dbus-1.0/dbus/dbus-python.h \ debian/tmp-$$v.h || exit 1; \ - diff --brief debian/python-dbus/usr/lib/pkgconfig/dbus-python.pc \ + diff --brief debian/tmp/usr/lib/pkgconfig/dbus-python.pc \ debian/tmp-$$v.pc || exit 1; \ done rm -f debian/tmp-*.pc debian/tmp-*.h - for i in $$(find debian/python-dbus-dbg -name '*.so'); do \ - b=$$(basename $$i .so); \ - mv $$i $$(dirname $$i)/$${b}_d.so; \ - done clean:: dh_testdir @@ -141,7 +154,8 @@ dh_link -s dh_compress -s -X.py -X.js dh_fixperms -s - dh_python2 -s + dh_python2 -s -v + dh_python3 -s -v dh_installdeb -s dh_shlibdeps -s dh_gencontrol -s @@ -149,4 +163,6 @@ dh_builddeb -s binary: binary-arch binary-indep + autoreconf + .PHONY: build clean binary-indep binary-arch binary install-arch install-clean -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/893091 Title: Port dbus-python to Python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/python-dbus/+bug/893091/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
