Package: stevedore
Version: 0.10-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu saucy ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/control,rules: Enable python3 support.

I also wrap-and-sort'ed debian/control which created an extra bit of diff;
feel free to drop that if you wish to!

Thanks for considering the patch.

Cheers

James


-- System Information:
Debian Release: wheezy/sid
  APT prefers saucy-updates
  APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'), 
(100, 'saucy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10.0-6-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru stevedore-0.10/debian/changelog stevedore-0.10/debian/changelog
diff -Nru stevedore-0.10/debian/control stevedore-0.10/debian/control
--- stevedore-0.10/debian/control	2013-07-20 15:20:40.000000000 +0100
+++ stevedore-0.10/debian/control	2013-08-09 13:36:27.000000000 +0100
@@ -2,14 +2,18 @@
 Section: python
 Priority: extra
 Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
-Uploaders: Julien Danjou <a...@debian.org>,
-           Thomas Goirand <z...@debian.org>
-Build-Depends: debhelper (>= 8.0.0),
+Uploaders: Julien Danjou <a...@debian.org>, Thomas Goirand <z...@debian.org>
+Build-Depends:
+ debhelper (>= 8.0.0),
+ openstack-pkg-tools,
  python (>= 2.6.6-3~),
- python-nose,
  python-mock,
+ python-nose,
  python-setuptools,
- openstack-pkg-tools
+ python3-all (>= 3.1.2-7~),
+ python3-mock,
+ python3-nose,
+ python3-setuptools
 Standards-Version: 3.9.4
 Homepage: https://github.com/dreamhost/stevedore
 Vcs-Git: git://git.debian.org/collab-maint/stevedore.git
@@ -18,11 +22,25 @@
 Package: python-stevedore
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
 Description: manage dynamic plugins for Python applications
  Python makes loading code dynamically easy, allowing you to configure and
  extend your application by discovering and loading extensions (plugins) at
  runtime. Many applications implement their own library for doing this, using
+ __import__ or importlib. stevedore avoids creating yet another extension
+ mechanism by building on top of setuptools entry points. The code for managing
+ entry points tends to be repetitive, though, so stevedore provides manager
+ classes for implementing common patterns for using dynamically loaded
+ extensions.
+
+Package: python3-stevedore
+Architecture: all
+Pre-Depends: dpkg (>= 1.15.6~)
+Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
+Description: manage dynamic plugins for Python applications (python3)
+ Python makes loading code dynamically easy, allowing you to configure and
+ extend your application by discovering and loading extensions (plugins) at
+ runtime. Many applications implement their own library for doing this, using
  __import__ or importlib. stevedore avoids creating yet another extension
  mechanism by building on top of setuptools entry points. The code for managing
  entry points tends to be repetitive, though, so stevedore provides manager
diff -Nru stevedore-0.10/debian/rules stevedore-0.10/debian/rules
--- stevedore-0.10/debian/rules	2013-07-20 15:20:40.000000000 +0100
+++ stevedore-0.10/debian/rules	2013-08-09 13:33:55.000000000 +0100
@@ -4,11 +4,33 @@
 
 include /usr/share/openstack-pkg-tools/pkgos.make
 
+PYTHON2=$(shell pyversions -vr)
+PYTHON3=$(shell py3versions -vr)
+
 %:
-	dh $@ --with=python2
+	dh $@ --with=python2,python3
+
+override_dh_atuo_build:
+	set -e && for pyvers in $(PYTHON2); do \
+		python$$pyvers setup.py build; \
+	done
+	set -e && for pyvers in $(PYTHON3); do \
+		python$$pyvers setup.py build; \
+	done
+
+override_dh_auto_install:
+	set -e && for pyvers in $(PYTHON2); do \
+		python$$pyvers setup.py install --install-layout=deb \
+			--root $(CURDIR)/debian/python-stevedore; \
+	done
+	set -e && for pyvers in $(PYTHON3); do \
+		python$$pyvers setup.py install --install-layout=deb \
+			--root $(CURDIR)/debian/python3-stevedore; \
+	done
 
 override_dh_auto_test:
 	PYTHONPATH=. nosetests -d stevedore
+	PYTHONPATH=. nosetests3 -d stevedore
 
 override_dh_clean:
 	dh_clean

Reply via email to