Package: python-xmltodict
Version: 0.9.2-1
Severity: normal
Tags: patch

Dear Maintainer,

I have included a patch which provides the Python 3 package.

The patch switches the package build system to pybuild which 
automatically handle the creation of the Python 2 and 3 binary 
packages, as well as calling their corresponding test suite.

I stuck closely to the official guidelines in [1].

Best regards,
Ghislain

[1] https://wiki.debian.org/Python/LibraryStyleGuide


-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-xmltodict depends on:
pn  python:any  <none>

python-xmltodict recommends no packages.

python-xmltodict suggests no packages.

-- no debconf information
diff -Nru python-xmltodict-0.9.2/debian/changelog python-xmltodict-0.9.2/debian/changelog
--- python-xmltodict-0.9.2/debian/changelog	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/changelog	2015-04-14 20:09:14.000000000 +0100
@@ -1,3 +1,14 @@
+python-xmltodict (0.9.2-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+
+  [Ghislain Antony Vaillant]
+  * Use pybuild as package build system.
+  * Add Python 3 version of the binary package.
+  * d/rules: proper cleanup of .coverage
+
+ -- Ghislain Antony Vaillant <[email protected]>  Tue, 14 Apr 2015 19:30:22 +0100
+
 python-xmltodict (0.9.2-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru python-xmltodict-0.9.2/debian/control python-xmltodict-0.9.2/debian/control
--- python-xmltodict-0.9.2/debian/control	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/control	2015-04-14 19:36:11.000000000 +0100
@@ -4,22 +4,37 @@
 Maintainer: Sebastien Badia <[email protected]>
 Build-Depends: debhelper (>= 9),
                dh-python,
-               python,
-               python3,
+               python-all,
+               python3-all,
                python-coverage,
                python-nose,
-               python-setuptools
+               python-setuptools,
+               python3-coverage,
+               python3-nose,
+               python3-setuptools
 Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/python-xmltodict.git
 Vcs-Git: git://anonscm.debian.org/collab-maint/python-xmltodict.git
 Homepage: https://github.com/martinblech/xmltodict
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 
 Package: python-xmltodict
 Architecture: all
-Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, ${python:Depends}
-Recommends: ${python:Recommends}
-Description: Makes working with XML feel like you are working with JSON
+Description: Makes working with XML feel like you are working with JSON (Python 2)
  xmltodict is a Python module that makes working with XML feel like you are
  working with JSON. xmltodict is very fast (Expat-based) and has a streaming
  mode with a small memory footprint, suitable for big XML dumps.
+ .
+ This package provides the Python 2 version of the library.
+
+Package: python3-xmltodict
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Description: Makes working with XML feel like you are working with JSON (Python 3)
+ xmltodict is a Python module that makes working with XML feel like you are
+ working with JSON. xmltodict is very fast (Expat-based) and has a streaming
+ mode with a small memory footprint, suitable for big XML dumps.
+ .
+ This package provides the Python 3 version of the library.
diff -Nru python-xmltodict-0.9.2/debian/python3-xmltodict.docs python-xmltodict-0.9.2/debian/python3-xmltodict.docs
--- python-xmltodict-0.9.2/debian/python3-xmltodict.docs	1970-01-01 01:00:00.000000000 +0100
+++ python-xmltodict-0.9.2/debian/python3-xmltodict.docs	2015-04-14 19:29:53.000000000 +0100
@@ -0,0 +1 @@
+README.md
diff -Nru python-xmltodict-0.9.2/debian/rules python-xmltodict-0.9.2/debian/rules
--- python-xmltodict-0.9.2/debian/rules	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/rules	2015-04-14 20:00:40.000000000 +0100
@@ -1,16 +1,18 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME = xmltodict
+
 %:
-	dh $@ --buildsystem=python_distutils --with python2,python3
+	dh $@ --buildsystem=pybuild --with python2,python3
+
 
-ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
 override_dh_auto_test:
-	PYTHONPATH=. \
-        LC_ALL=en_US.UTF-8 \
-	nosetests --with-coverage --cover-package=xmltodict
-endif
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="nosetests --with-coverage --cover-package=${PYBUILD_NAME}" \
+	dh_auto_test
+
 
 override_dh_auto_clean:
 	dh_auto_clean
-	[ ! -d .coverage ] || rm -r .coverage
+	[ ! -f .coverage ] || rm .coverage
 	[ ! -d xmltodict.egg-info ] || rm -r xmltodict.egg-info
diff -Nru python-xmltodict-0.9.2/debian/changelog python-xmltodict-0.9.2/debian/changelog
--- python-xmltodict-0.9.2/debian/changelog	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/changelog	2015-04-14 20:09:14.000000000 +0100
@@ -1,3 +1,14 @@
+python-xmltodict (0.9.2-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+
+  [Ghislain Antony Vaillant]
+  * Use pybuild as package build system.
+  * Add Python 3 version of the binary package.
+  * d/rules: proper cleanup of .coverage
+
+ -- Ghislain Antony Vaillant <[email protected]>  Tue, 14 Apr 2015 19:30:22 +0100
+
 python-xmltodict (0.9.2-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru python-xmltodict-0.9.2/debian/control python-xmltodict-0.9.2/debian/control
--- python-xmltodict-0.9.2/debian/control	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/control	2015-04-14 19:36:11.000000000 +0100
@@ -4,22 +4,37 @@
 Maintainer: Sebastien Badia <[email protected]>
 Build-Depends: debhelper (>= 9),
                dh-python,
-               python,
-               python3,
+               python-all,
+               python3-all,
                python-coverage,
                python-nose,
-               python-setuptools
+               python-setuptools,
+               python3-coverage,
+               python3-nose,
+               python3-setuptools
 Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/python-xmltodict.git
 Vcs-Git: git://anonscm.debian.org/collab-maint/python-xmltodict.git
 Homepage: https://github.com/martinblech/xmltodict
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 
 Package: python-xmltodict
 Architecture: all
-Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, ${python:Depends}
-Recommends: ${python:Recommends}
-Description: Makes working with XML feel like you are working with JSON
+Description: Makes working with XML feel like you are working with JSON (Python 2)
  xmltodict is a Python module that makes working with XML feel like you are
  working with JSON. xmltodict is very fast (Expat-based) and has a streaming
  mode with a small memory footprint, suitable for big XML dumps.
+ .
+ This package provides the Python 2 version of the library.
+
+Package: python3-xmltodict
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Description: Makes working with XML feel like you are working with JSON (Python 3)
+ xmltodict is a Python module that makes working with XML feel like you are
+ working with JSON. xmltodict is very fast (Expat-based) and has a streaming
+ mode with a small memory footprint, suitable for big XML dumps.
+ .
+ This package provides the Python 3 version of the library.
diff -Nru python-xmltodict-0.9.2/debian/python3-xmltodict.docs python-xmltodict-0.9.2/debian/python3-xmltodict.docs
--- python-xmltodict-0.9.2/debian/python3-xmltodict.docs	1970-01-01 01:00:00.000000000 +0100
+++ python-xmltodict-0.9.2/debian/python3-xmltodict.docs	2015-04-14 19:29:53.000000000 +0100
@@ -0,0 +1 @@
+README.md
diff -Nru python-xmltodict-0.9.2/debian/rules python-xmltodict-0.9.2/debian/rules
--- python-xmltodict-0.9.2/debian/rules	2015-04-14 20:14:47.000000000 +0100
+++ python-xmltodict-0.9.2/debian/rules	2015-04-14 20:00:40.000000000 +0100
@@ -1,16 +1,18 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME = xmltodict
+
 %:
-	dh $@ --buildsystem=python_distutils --with python2,python3
+	dh $@ --buildsystem=pybuild --with python2,python3
+
 
-ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
 override_dh_auto_test:
-	PYTHONPATH=. \
-        LC_ALL=en_US.UTF-8 \
-	nosetests --with-coverage --cover-package=xmltodict
-endif
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="nosetests --with-coverage --cover-package=${PYBUILD_NAME}" \
+	dh_auto_test
+
 
 override_dh_auto_clean:
 	dh_auto_clean
-	[ ! -d .coverage ] || rm -r .coverage
+	[ ! -f .coverage ] || rm .coverage
 	[ ! -d xmltodict.egg-info ] || rm -r xmltodict.egg-info

Reply via email to