Package: src:python-tz
Severity: normal

Dear Maintainer,

I have just uploaded version 2016.7-0.1 to DELAYED/5. Other than
importing a new upstream version, I have made some changes to the
package, including fixing RC bug #839460. Patches over 2015.7+dfsg-0.1
are attached.

Feel free to reschedule or cancel my upload as you see fit.

Cheers,
-Hilko
>From 14ed4482253c54f81cabf605f68236b0eb2e9873 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Wed, 23 Nov 2016 23:22:59 +0100
Subject: [PATCH 1/5] Add tzdata build-dependency (Closes: #839460)

---
 debian/control | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index b272261..bbac7af 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,8 @@ Build-Depends: debhelper (>= 7.0.50~), dh-python,
                python-all (>= 2.6.6-3~),
                python3-all,
                python-setuptools,
-               python3-setuptools
+               python3-setuptools,
+               tzdata,
 Standards-Version: 3.9.3
 Homepage: http://pypi.python.org/pypi/pytz/
 X-Python-Version: >= 2.4
-- 
2.10.2

>From 54f3b591b049a2d193271f5574d96f887cbac5f8 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Wed, 23 Nov 2016 23:24:47 +0100
Subject: [PATCH 2/5] Bump Standards-Version

---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index bbac7af..fc95c2b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 7.0.50~), dh-python,
                python-setuptools,
                python3-setuptools,
                tzdata,
-Standards-Version: 3.9.3
+Standards-Version: 3.9.8
 Homepage: http://pypi.python.org/pypi/pytz/
 X-Python-Version: >= 2.4
 X-Python3-Version: >= 3.1
-- 
2.10.2

>From 5231d4140042e5ee6cbbf57f0bcbdef0dbf31a91 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Wed, 23 Nov 2016 23:28:49 +0100
Subject: [PATCH 3/5] Bump Debhelper version, simplify debian/rules

---
 debian/compat             |  2 +-
 debian/control            |  2 +-
 debian/python-tz.install  |  1 +
 debian/python3-tz.install |  1 +
 debian/rules              | 37 ++-----------------------------------
 5 files changed, 6 insertions(+), 37 deletions(-)
 create mode 100644 debian/python-tz.install
 create mode 100644 debian/python3-tz.install

diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index fc95c2b..eafaa56 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian/Ubuntu Zope Team <pkg-zope-develop...@lists.alioth.debian.org>
 Uploaders: Brian Sutherland <br...@vanguardistas.net>,
            Fabio Tranchitella <kob...@debian.org>
-Build-Depends: debhelper (>= 7.0.50~), dh-python,
+Build-Depends: debhelper (>= 9~), dh-python,
                python-all (>= 2.6.6-3~),
                python3-all,
                python-setuptools,
diff --git a/debian/python-tz.install b/debian/python-tz.install
new file mode 100644
index 0000000..dbdb301
--- /dev/null
+++ b/debian/python-tz.install
@@ -0,0 +1 @@
+/usr/lib/python2*
diff --git a/debian/python3-tz.install b/debian/python3-tz.install
new file mode 100644
index 0000000..fef6392
--- /dev/null
+++ b/debian/python3-tz.install
@@ -0,0 +1 @@
+/usr/lib/python3*
diff --git a/debian/rules b/debian/rules
index 399f7d5..f1d5e38 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,43 +1,10 @@
 #!/usr/bin/make -f
 
-PACKAGE=python-tz
-PACKAGE_PYTHON3=python3-tz
-
-PYVERS:=$(shell pyversions -r)
-PY3VERS:=$(shell py3versions -r)
-
 %:
-	dh --with python2 --with python3 $@
-
-override_dh_auto_build:
-	dh_auto_build -p$(PACKAGE)
-
-	set -e; \
-	for python in $(PY3VERS); do \
-		$$python setup.py build; \
-	done
-
-override_dh_auto_install:
-	dh_auto_install -p$(PACKAGE) --destdir=$(CURDIR)/debian/$(PACKAGE)
-
-	set -ex; \
-	for python in $(PY3VERS); do \
-		$$python setup.py install --install-layout=deb \
-			--root=$(CURDIR)/debian/$(PACKAGE_PYTHON3); \
-	done
-
-override_dh_auto_test:
-	python -m unittest discover -v pytz/tests
-	for python in $(PY3VERS); do \
-	    $$python -m unittest discover -v pytz/tests; \
-	done
-
-override_dh_clean:
-	dh_clean
-	rm -rf build
+	dh $@ --with=python2,python3 --buildsystem=pybuild
 
 override_dh_install:
-	dh_install
+	dh_install --fail-missing
 
 	# install our testing package
 	install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py
-- 
2.10.2

>From 440b2bdfee582ab92395acfaade527faf53052de Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Wed, 23 Nov 2016 23:41:14 +0100
Subject: [PATCH 4/5] Re-enable, rebase zoneinfo patch

---
 debian/patches/series |  1 +
 debian/patches/tzdata | 49 +++++++++++++++++++++++++------------------------
 2 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
index e69de29..0883ff0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+tzdata
diff --git a/debian/patches/tzdata b/debian/patches/tzdata
index b905b2f..2fd2d8b 100644
--- a/debian/patches/tzdata
+++ b/debian/patches/tzdata
@@ -1,24 +1,15 @@
 Description: Use system zone information from the tzdata package
 Author: Kurt Roeckx <k...@roeckx.be>
+Author: Hilko Bengen <ben...@debian.org>
 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416202
 Forwarded: not-needed
-Last-Update: 2014-11-12
+Last-Update: 2016-11-24
 
---- a/pytz/__init__.py
-+++ b/pytz/__init__.py
-@@ -25,11 +25,6 @@
- 
- import sys, datetime, os.path, gettext
- 
--try:
--    from pkg_resources import resource_stream
--except ImportError:
--    resource_stream = None
--
- from pytz.exceptions import AmbiguousTimeError
- from pytz.exceptions import InvalidTimeError
- from pytz.exceptions import NonExistentTimeError
-@@ -82,17 +77,12 @@
+Index: python-tz/pytz/__init__.py
+===================================================================
+--- python-tz.orig/pytz/__init__.py
++++ python-tz/pytz/__init__.py
+@@ -77,23 +77,12 @@ def open_resource(name):
      Uses the pkg_resources module if available and no standard file
      found at the calculated location.
      """
@@ -29,18 +20,26 @@ Last-Update: 2014-11-12
              raise ValueError('Bad path segment: %r' % part)
 -    filename = os.path.join(os.path.dirname(__file__),
 -                            'zoneinfo', *name_parts)
--    if not os.path.exists(filename) and resource_stream is not None:
+-    if not os.path.exists(filename):
 -        # http://bugs.launchpad.net/bugs/383171 - we avoid using this
 -        # unless absolutely necessary to help when a broken version of
 -        # pkg_resources is installed.
--        return resource_stream(__name__, 'zoneinfo/' + name)
+-        try:
+-            from pkg_resources import resource_stream
+-        except ImportError:
+-            resource_stream = None
+-
+-        if resource_stream is not None:
+-            return resource_stream(__name__, 'zoneinfo/' + name)
 +    filename = os.path.join('/usr/share/zoneinfo', *name_parts)
      return open(filename, 'rb')
  
  
---- a/pytz/tzfile.py
-+++ b/pytz/tzfile.py
-@@ -127,7 +127,8 @@
+Index: python-tz/pytz/tzfile.py
+===================================================================
+--- python-tz.orig/pytz/tzfile.py
++++ python-tz/pytz/tzfile.py
+@@ -127,7 +127,8 @@ def build_tzinfo(zone, fp):
  if __name__ == '__main__':
      import os.path
      from pprint import pprint
@@ -50,9 +49,11 @@ Last-Update: 2014-11-12
      tz = build_tzinfo('Australia/Melbourne',
                        open(os.path.join(base,'Australia','Melbourne'), 'rb'))
      tz = build_tzinfo('US/Eastern',
---- a/setup.py
-+++ b/setup.py
-@@ -13,15 +13,8 @@
+Index: python-tz/setup.py
+===================================================================
+--- python-tz.orig/setup.py
++++ python-tz/setup.py
+@@ -13,15 +13,8 @@ me = 'Stuart Bishop'
  memail = 'stu...@stuartbishop.net'
  packages = ['pytz']
  resources = ['zone.tab', 'locales/pytz.pot']
-- 
2.10.2

>From c1a38b533edbd4e206972fe08526f37add70dbc6 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Wed, 23 Nov 2016 23:55:11 +0100
Subject: [PATCH 5/5] 2016.7-0.1

---
 debian/changelog | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 24814fc..9add21a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+python-tz (2016.7-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * New upstream version 2016.7 (Closes: #824374)
+  * Add tzdata build-dependency (Closes: #839460)
+  * Re-enable, rebase zoneinfo patch
+  * Modernize package (Closes: #674083)
+    * Bump Standards-Version
+    * Bump Debhelper version, simplify debian/rules
+
+ -- Hilko Bengen <ben...@debian.org>  Wed, 23 Nov 2016 23:55:03 +0100
+
 python-tz (2015.7+dfsg-0.1) unstable; urgency=medium
 
   * Non-maintainer upload. (Closes: #792192)
-- 
2.10.2

Reply via email to