Package: python-iso8601
Version: 0.1.8-0.1
Severity: wishlist
Tags: patch

Dear Benjamin,

On some of OpenStack packages, I wish to add support for Python3, however
the lack of Python3 support in python-iso8601 is currently a blocker.

Attached to this bug repport, you will find a debdiff which adds support
for Python3. Unfortunately, this has been done using Debhelper, because
I don't really know CDBS. If there's a way to do it with CDBS and you
wish to continue using it, then great. Otherwise, you can apply the
attached patch if you find it ok.

If you don't have time to do this work, let me know if I can NMU the
Python3 support, as per the attached patch.

Cheers,

Thomas Goirand (zigo)
diff -Nru python-iso8601-0.1.8/debian/changelog python-iso8601-0.1.8/debian/changelog
--- python-iso8601-0.1.8/debian/changelog	2013-12-18 06:29:45.000000000 +0800
+++ python-iso8601-0.1.8/debian/changelog	2014-02-09 16:03:39.000000000 +0800
@@ -1,3 +1,12 @@
+python-iso8601 (0.1.8-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Added support for Python 3.x.
+  * Upgraded to debhelper and compat 9.
+  * Standards-Version: is now 3.9.5.
+
+ -- Thomas Goirand <z...@debian.org>  Sun, 09 Feb 2014 15:55:50 +0800
+
 python-iso8601 (0.1.8-1) unstable; urgency=low
 
   * New upstream version. (Closes: #732284)
diff -Nru python-iso8601-0.1.8/debian/compat python-iso8601-0.1.8/debian/compat
--- python-iso8601-0.1.8/debian/compat	2013-12-18 06:29:45.000000000 +0800
+++ python-iso8601-0.1.8/debian/compat	2014-02-09 15:56:28.000000000 +0800
@@ -1 +1 @@
-7
+9
diff -Nru python-iso8601-0.1.8/debian/control python-iso8601-0.1.8/debian/control
--- python-iso8601-0.1.8/debian/control	2013-12-18 06:30:26.000000000 +0800
+++ python-iso8601-0.1.8/debian/control	2014-02-09 16:04:35.000000000 +0800
@@ -2,19 +2,36 @@
 Section: python
 Priority: extra
 Maintainer: Benjamin Mako Hill <m...@debian.org>
-Build-Depends: cdbs, debhelper (>= 7.0.50~), python-all
+Build-Depends: debhelper (>= 9),
+               python-all (>= 2.6.6-3~),
+               python-pytest,
+               python-setuptools,
+               python3-all (>= 3.2),
+               python3-setuptools
 Build-Depends-Indep: python-support (>=0.90)
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Homepage: https://code.google.com/p/pyiso8601
 
 Package: python-iso8601
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}, ${python:Depends}
 Provides: ${python:Provides}
-Description: python module to parse ISO 8601 dates
+Description: python module to parse ISO 8601 dates - Python 2.x
  Many file formats and standards use the ISO 8601 date format
  (e.g. 2007-01-14T20:34:22+00:00) to store dates in a neutral,
  unambiguous manner. This simple Python module parses the most common
  forms encountered and returns Python datetime objects.
+ .
+ This package provides the Python 2.x module.
 
-
+Package: python3-iso8601
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Provides: ${python3:Provides}
+Description: python module to parse ISO 8601 dates - Python 3.x
+ Many file formats and standards use the ISO 8601 date format
+ (e.g. 2007-01-14T20:34:22+00:00) to store dates in a neutral,
+ unambiguous manner. This simple Python module parses the most common
+ forms encountered and returns Python datetime objects.
+ .
+ This package provides the Python 3.x module.
diff -Nru python-iso8601-0.1.8/debian/copyright python-iso8601-0.1.8/debian/copyright
--- python-iso8601-0.1.8/debian/copyright	2013-12-18 06:29:45.000000000 +0800
+++ python-iso8601-0.1.8/debian/copyright	2014-02-09 15:59:54.000000000 +0800
@@ -40,4 +40,3 @@
 The Debian packaging is:
 
     Copyright (C) 2011 Benjamin Mako Hill <m...@debian.org>
-
diff -Nru python-iso8601-0.1.8/debian/rules python-iso8601-0.1.8/debian/rules
--- python-iso8601-0.1.8/debian/rules	2013-12-18 07:08:14.000000000 +0800
+++ python-iso8601-0.1.8/debian/rules	2014-02-09 16:05:22.000000000 +0800
@@ -1,9 +1,17 @@
 #!/usr/bin/make -f
 
-DEB_PYTHON_SYSTEM=pysupport
+PYTHONS:=$(shell pyversions -vr)
+PYTHON3S:=$(shell py3versions -vr)
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
+%:
+	dh $@ --buildsystem=python_distutils --with python2,python3
 
-clean::
-	rm -rf iso8601.egg-info
+override_dh_auto_install:
+	set -e && for pyvers in $(PYTHONS); do \
+		python$$pyvers setup.py install --install-layout=deb \
+			--root $(CURDIR)/debian/python-iso8601; \
+        done
+	set -e && for pyvers in $(PYTHON3S); do \
+		python$$pyvers setup.py install --install-layout=deb \
+			--root $(CURDIR)/debian/python3-iso8601; \
+	done

Reply via email to