Merge lp:~takluyver/ubuntu/quantal/python-tz/merge-py3 into lp:ubuntu/quantal/python-tz

Proposed by Thomas Kluyver
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~takluyver/ubuntu/quantal/python-tz/merge-py3
Merge into: lp:ubuntu/quantal/python-tz
Diff against target: 252 lines (+99/-66)
9 files modified
debian/changelog (+9/-0)
debian/clean (+1/-0)
debian/control (+20/-2)
debian/copyright (+31/-60)
debian/patches/tzdata (+5/-0)
debian/rules (+31/-1)
debian/test-pytz (+1/-1)
debian/watch (+1/-1)
pytz.egg-info/SOURCES.txt (+0/-1)
To merge this branch: bzr merge lp:~takluyver/ubuntu/quantal/python-tz/merge-py3
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Ubuntu branches Pending
Review via email: mp+105551@code.launchpad.net

Description of the change

This merges packaging changes from Debian to build a python3-tz package.

I also cleaned up a couple of Lintian warnings, and I noticed that the zoneinfo data files weren't being removed from the Python 3 package, so I fixed that.

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Hi Thomas,

This is really great, and I appreciate your contribution to Ubuntu, especially because this adds Python 3 support to a very useful package. I was able to build it locally and try it out on both Python 2 and Python 3. Everything works great.

I get one warning when building the source package:

W: python-tz source: missing-license-paragraph-in-dep5-copyright public-domain (paragraph at line 27)

and I get one minor warning on the resulting .debs:

% lintian *.deb
W: python-tz: wrong-name-for-upstream-changelog usr/share/doc/python-tz/CHANGES.txt

The other thing I suggest is to structure your debian/rules file to be more in line with these recommendations:

http://wiki.debian.org/Python/LibraryStyleGuide

Pay attention specifically to the section on enabling the tests in all versions (which I see is currently disabled -- why?) and in avoiding the use of for-loops to build the Python 3 packages. If you fix these, I would happily sponsor your upload, but for Quantal only, as this is a new feature that isn't appropriate for SRU'ing into Precise.

review: Needs Fixing
Revision history for this message
Barry Warsaw (barry) wrote :

Oh, also it should be

%:
        dh $@ --with python2,python3

Revision history for this message
Thomas Kluyver (takluyver) wrote :

Thanks, Barry

A few questions:

- Missing license description for 'public domain' - the Debian manual says that the description should contain details of exactly what exemptions from copyright are made [1]. I had no involvement in making the timezone database, and the webpage about it just describes it as "the public domain time zone database"[2], so I don't know what details I can put.

- debian/rules structure: Is it worth restructuring just for Ubuntu, given that it will make a new diff against Debian's version? I'd prefer to keep the diff as small as practical, so that future merges are easy.

- Tests: They were disabled in Ubuntu earlier this year, a day after they were enabled [3]. Chuck doesn't give a reason in the commit message, but I assume he had one.

[1] http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#public-domain
[2] http://www.iana.org/time-zones/repository/tz-link.html
[3] http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/python-tz/quantal/revision/27

Revision history for this message
Barry Warsaw (barry) wrote :

On May 22, 2012, at 09:44 PM, Thomas Kluyver wrote:

>- Missing license description for 'public domain' - the Debian manual says
> that the description should contain details of exactly what exemptions from
> copyright are made [1]. I had no involvement in making the timezone
> database, and the webpage about it just describes it as "the public domain
> time zone database"[2], so I don't know what details I can put.

Okay, we'll leave this one alone.

>- debian/rules structure: Is it worth restructuring just for Ubuntu, given
> that it will make a new diff against Debian's version? I'd prefer to keep
> the diff as small as practical, so that future merges are easy.

It's a good question. Given that Ubuntu's python-tz is so far ahead of Debian
(which in itself is unfortunate), it might be worth making our package conform
to current standards, and then try to push those changes back to Debian. But
I can be convinced otherwise, if it makes merging whatever meager bits we
still can from Debian.

>- Tests: They were disabled in Ubuntu earlier this year, a day after they
> were enabled [3]. Chuck doesn't give a reason in the commit message, but I
> assume he had one.

I talked to Chuck on IRC about this one. I says that the tests got
re-disabled almost immediately because they weren't actually testing
python-tz. He wasn't sure what the tests were actually testing. So I guess
we can leave this one alone too.

Okay, I think it's worth getting Python 3 support to go ahead and do the
merge. I'll sponsor that. Eventually it would be good to modernize the
Debian package (with the d/rules improvements), but we can worry about that
later. Perhaps you'd care to file a bug with Debian on that?

Revision history for this message
Barry Warsaw (barry) :
review: Approve
Revision history for this message
Thomas Kluyver (takluyver) wrote :

Great, thanks. I've sent a report to Debian about the suggestions for debian/rules:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674083

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-28 10:36:56 +0000
+++ debian/changelog 2012-05-12 11:20:23 +0000
@@ -1,3 +1,12 @@
1python-tz (2011k-0ubuntu6) precise; urgency=low
2
3 * Merge with Debian unstable (now builds for Python 3)
4 * Bump standards version to 3.9.3
5 * Add metadata to tzdata patch
6 * Remove zoneinfo data from python3-tz package
7
8 -- Thomas Kluyver <thomas@kluyver.me.uk> Sat, 12 May 2012 11:25:52 +0100
9
1python-tz (2011k-0ubuntu5) precise; urgency=low10python-tz (2011k-0ubuntu5) precise; urgency=low
211
3 * Disable testsuite12 * Disable testsuite
413
=== added file 'debian/clean'
--- debian/clean 1970-01-01 00:00:00 +0000
+++ debian/clean 2012-05-12 11:20:23 +0000
@@ -0,0 +1,1 @@
1pytz.egg-info/*
02
=== modified file 'debian/control'
--- debian/control 2012-01-06 10:29:22 +0000
+++ debian/control 2012-05-12 11:20:23 +0000
@@ -4,11 +4,17 @@
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org>5XSBC-Original-Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org>
6Uploaders: Brian Sutherland <brian@vanguardistas.net>, Fabio Tranchitella <kobold@debian.org>6Uploaders: Brian Sutherland <brian@vanguardistas.net>, Fabio Tranchitella <kobold@debian.org>
7Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools7Build-Depends: debhelper (>= 7.0.50~),
8Standards-Version: 3.9.28 python-all (>= 2.6.6-3~),
9 python3-all,
10 python-setuptools,
11 python3-setuptools
12Standards-Version: 3.9.3
9Homepage: http://pypi.python.org/pypi/pytz/13Homepage: http://pypi.python.org/pypi/pytz/
10X-Python-Version: >= 2.414X-Python-Version: >= 2.4
15X-Python3-Version: >= 3.1
11Vcs-Svn: svn://svn.debian.org/svn/pkg-zope/python-tz/trunk16Vcs-Svn: svn://svn.debian.org/svn/pkg-zope/python-tz/trunk
17Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/python-tz/trunk
1218
13Package: python-tz19Package: python-tz
14Architecture: all20Architecture: all
@@ -19,3 +25,15 @@
19 It also solves the issue of ambiguous times at the end of daylight savings,25 It also solves the issue of ambiguous times at the end of daylight savings,
20 which you can read more about in the Python Library Reference26 which you can read more about in the Python Library Reference
21 (datetime.tzinfo).27 (datetime.tzinfo).
28
29Package: python3-tz
30Architecture: all
31Depends: tzdata, ${python3:Depends}, ${misc:Depends}
32Description: Python3 version of the Olson timezone database
33 python-tz brings the Olson tz database into Python. This library allows
34 accurate and cross platform timezone calculations using Python 2.3 or higher.
35 It also solves the issue of ambiguous times at the end of daylight savings,
36 which you can read more about in the Python Library Reference
37 (datetime.tzinfo).
38 .
39 This package contains the Python 3 version of the library.
2240
=== modified file 'debian/copyright'
--- debian/copyright 2008-10-27 07:29:54 +0000
+++ debian/copyright 2012-05-12 11:20:23 +0000
@@ -1,60 +1,31 @@
1This package was debianized by Brian Sutherland <jinty@web.de> on1Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174
2Tue, 8 Feb 2005 02:14:33 +0100.2Upstream-Name: pytz
33Upstream-Contact: Stuart Bishop <stuart@stuartbishop.net>
4It was downloaded from http://pypi.python.org/pypi/pytz/4Source: http://pypi.python.org/pypi/pytz/
55
6Copyright:6Files: *
77Copyright: (c) 2003-2008 Stuart Bishop <stuart@stuartbishop.net>
8Upstream Author: Stuart Bishop <stuart@stuartbishop.net>8License: Expat
99 Permission is hereby granted, free of charge, to any person obtaining a
10This package is the result of an automatic generation from the Olsen database10 copy of this software and associated documentation files (the "Software"),
11(available from ftp://elsie.nci.nih.gov/pub). This means that there are two11 to deal in the Software without restriction, including without limitation
12licenses involved, that of the original distribution and the automatic12 the rights to use, copy, modify, merge, publish, distribute, sublicense,
13generation code. Fortunately both are BSD style.13 and/or sell copies of the Software, and to permit persons to whom the
1414 Software is furnished to do so, subject to the following conditions:
15Both are included here as they are quite different from the standard BSD style15 .
16license distributed with Debian.16 The above copyright notice and this permission notice shall be included in
1717 all copies or substantial portions of the Software.
1818 .
19License:19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2020 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21The files of the original database distribution contain this license text:21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2222 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23/*23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24** Copyright (c) 1989 The Regents of the University of California.24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25** All rights reserved.25 DEALINGS IN THE SOFTWARE.
26**26
27** Redistribution and use in source and binary forms are permitted27Files: pytz/zoneinfo/*
28** provided that the above copyright notice and this paragraph are28Copyright: Arthur David Olson et.al. <tz@elsie.nci.nih.gov>
29** duplicated in all such forms and that any documentation,29License: public-domain
30** advertising materials, and other materials related to such30Comment: excluded from binary package
31** distribution and use acknowledge that the software was developed31
32** by the University of California, Berkeley. The name of the
33** University may not be used to endorse or promote products derived
34** from this software without specific prior written permission.
35** THIS SOFTWARE IS PROVIDED ``AS IS' AND WITHOUT ANY EXPRESS OR
36** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
37** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
38*/
39
40And the automatic generation code license is:
41
42Copyright (c) 2003-2008 Stuart Bishop <stuart@stuartbishop.net>
43
44Permission is hereby granted, free of charge, to any person obtaining a
45copy of this software and associated documentation files (the "Software"),
46to deal in the Software without restriction, including without limitation
47the rights to use, copy, modify, merge, publish, distribute, sublicense,
48and/or sell copies of the Software, and to permit persons to whom the
49Software is furnished to do so, subject to the following conditions:
50
51The above copyright notice and this permission notice shall be included in
52all copies or substantial portions of the Software.
53
54THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
57THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
59FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
60DEALINGS IN THE SOFTWARE.
6132
=== modified file 'debian/patches/tzdata'
--- debian/patches/tzdata 2011-11-08 15:47:51 +0000
+++ debian/patches/tzdata 2012-05-12 11:20:23 +0000
@@ -1,3 +1,8 @@
1Description: Use system zone information from the tzdata package
2Author: Kurt Roeckx <kurt@roeckx.be>
3Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416202
4Forwarded: not-needed
5
1Index: pytz-2011h/pytz/__init__.py6Index: pytz-2011h/pytz/__init__.py
2===================================================================7===================================================================
3--- pytz-2011h.orig/pytz/__init__.py 2011-10-21 15:14:54.048406509 +09008--- pytz-2011h.orig/pytz/__init__.py 2011-10-21 15:14:54.048406509 +0900
49
=== modified file 'debian/rules' (properties changed: +x to -x)
--- debian/rules 2012-02-28 10:36:56 +0000
+++ debian/rules 2012-05-12 11:20:23 +0000
@@ -1,14 +1,44 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
22
3PACKAGE=python-tz
4PACKAGE_PYTHON3=python3-tz
5
6PYVERS:=$(shell pyversions -r)
7PY3VERS:=$(shell py3versions -r)
8
3%:9%:
4 dh --with python2 $@10 dh --with python2 --with python3 $@
11
12override_dh_auto_build:
13 dh_auto_build -p$(PACKAGE)
14
15 set -e; \
16 for python in $(PY3VERS); do \
17 $$python setup.py build; \
18 done
19
20override_dh_auto_install:
21 dh_auto_install -p$(PACKAGE) --destdir=$(CURDIR)/debian/$(PACKAGE)
22
23 set -ex; \
24 for python in $(PY3VERS); do \
25 $$python setup.py install --install-layout=deb \
26 --root=$(CURDIR)/debian/$(PACKAGE_PYTHON3); \
27 done
28
29override_dh_clean:
30 dh_clean
31 rm -rf build
532
6override_dh_install:33override_dh_install:
7 dh_install34 dh_install
35
8 # install our testing package36 # install our testing package
9 install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py37 install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py
38
10 # remove zoneinfo, our patch to pytz makes it use the one from tzdata39 # remove zoneinfo, our patch to pytz makes it use the one from tzdata
11 rm -rf debian/python-tz/usr/lib/python*/*-packages/pytz/zoneinfo40 rm -rf debian/python-tz/usr/lib/python*/*-packages/pytz/zoneinfo
41 rm -rf debian/python3-tz/usr/lib/python*/*-packages/pytz/zoneinfo
1242
13#override_dh_auto_test:43#override_dh_auto_test:
14# set -e ; for pyversion in $(shell pyversions -r); do $$pyversion $(CURDIR)/pytz/tests/test_tzinfo.py ; done44# set -e ; for pyversion in $(shell pyversions -r); do $$pyversion $(CURDIR)/pytz/tests/test_tzinfo.py ; done
1545
=== modified file 'debian/test-pytz'
--- debian/test-pytz 2008-10-27 07:29:54 +0000
+++ debian/test-pytz 2012-05-12 11:20:23 +0000
@@ -13,5 +13,5 @@
13 tests += mod_tests13 tests += mod_tests
1414
15if not errors:15if not errors:
16 print "Ran %s tests successfully." % tests16 print("Ran %s tests successfully." % tests)
17sys.exit(errors)17sys.exit(errors)
1818
=== modified file 'debian/watch'
--- debian/watch 2008-10-27 07:29:54 +0000
+++ debian/watch 2012-05-12 11:20:23 +0000
@@ -1,2 +1,2 @@
1version=31version=3
2http://pypi.python.org/pypi/pytz http://pypi.python.org/packages/source/p/pytz/pytz-(.*).tar.gz#md5=.*2http://pypi.python.org/packages/source/p/pytz/pytz-(.*).tar.gz
33
=== modified file 'pytz.egg-info/SOURCES.txt'
--- pytz.egg-info/SOURCES.txt 2011-10-21 14:01:38 +0000
+++ pytz.egg-info/SOURCES.txt 2012-05-12 11:20:23 +0000
@@ -2,7 +2,6 @@
2LICENSE.txt2LICENSE.txt
3MANIFEST.in3MANIFEST.in
4README.txt4README.txt
5setup.cfg
6setup.py5setup.py
7pytz/__init__.py6pytz/__init__.py
8pytz/exceptions.py7pytz/exceptions.py

Subscribers

People subscribed via source and target branches