Merge lp:~takluyver/ubuntu/quantal/python-tz/merge-py3 into lp:ubuntu/quantal/python-tz
- Quantal (12.10)
- merge-py3
- Merge into quantal
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Barry Warsaw (community) | Approve | ||
Ubuntu branches | Pending | ||
Review via email: mp+105551@code.launchpad.net |
Commit message
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.
Barry Warsaw (barry) wrote : | # |
Oh, also it should be
%:
dh $@ --with python2,python3
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://
[2] http://
[3] http://
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?
Barry Warsaw (barry) : | # |
Thomas Kluyver (takluyver) wrote : | # |
Great, thanks. I've sent a report to Debian about the suggestions for debian/rules:
http://
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2012-02-28 10:36:56 +0000 | |||
3 | +++ debian/changelog 2012-05-12 11:20:23 +0000 | |||
4 | @@ -1,3 +1,12 @@ | |||
5 | 1 | python-tz (2011k-0ubuntu6) precise; urgency=low | ||
6 | 2 | |||
7 | 3 | * Merge with Debian unstable (now builds for Python 3) | ||
8 | 4 | * Bump standards version to 3.9.3 | ||
9 | 5 | * Add metadata to tzdata patch | ||
10 | 6 | * Remove zoneinfo data from python3-tz package | ||
11 | 7 | |||
12 | 8 | -- Thomas Kluyver <thomas@kluyver.me.uk> Sat, 12 May 2012 11:25:52 +0100 | ||
13 | 9 | |||
14 | 1 | python-tz (2011k-0ubuntu5) precise; urgency=low | 10 | python-tz (2011k-0ubuntu5) precise; urgency=low |
15 | 2 | 11 | ||
16 | 3 | * Disable testsuite | 12 | * Disable testsuite |
17 | 4 | 13 | ||
18 | === added file 'debian/clean' | |||
19 | --- debian/clean 1970-01-01 00:00:00 +0000 | |||
20 | +++ debian/clean 2012-05-12 11:20:23 +0000 | |||
21 | @@ -0,0 +1,1 @@ | |||
22 | 1 | pytz.egg-info/* | ||
23 | 0 | 2 | ||
24 | === modified file 'debian/control' | |||
25 | --- debian/control 2012-01-06 10:29:22 +0000 | |||
26 | +++ debian/control 2012-05-12 11:20:23 +0000 | |||
27 | @@ -4,11 +4,17 @@ | |||
28 | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
29 | 5 | XSBC-Original-Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org> | 5 | XSBC-Original-Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org> |
30 | 6 | Uploaders: Brian Sutherland <brian@vanguardistas.net>, Fabio Tranchitella <kobold@debian.org> | 6 | Uploaders: Brian Sutherland <brian@vanguardistas.net>, Fabio Tranchitella <kobold@debian.org> |
33 | 7 | Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools | 7 | Build-Depends: debhelper (>= 7.0.50~), |
34 | 8 | Standards-Version: 3.9.2 | 8 | python-all (>= 2.6.6-3~), |
35 | 9 | python3-all, | ||
36 | 10 | python-setuptools, | ||
37 | 11 | python3-setuptools | ||
38 | 12 | Standards-Version: 3.9.3 | ||
39 | 9 | Homepage: http://pypi.python.org/pypi/pytz/ | 13 | Homepage: http://pypi.python.org/pypi/pytz/ |
40 | 10 | X-Python-Version: >= 2.4 | 14 | X-Python-Version: >= 2.4 |
41 | 15 | X-Python3-Version: >= 3.1 | ||
42 | 11 | Vcs-Svn: svn://svn.debian.org/svn/pkg-zope/python-tz/trunk | 16 | Vcs-Svn: svn://svn.debian.org/svn/pkg-zope/python-tz/trunk |
43 | 17 | Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/python-tz/trunk | ||
44 | 12 | 18 | ||
45 | 13 | Package: python-tz | 19 | Package: python-tz |
46 | 14 | Architecture: all | 20 | Architecture: all |
47 | @@ -19,3 +25,15 @@ | |||
48 | 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, |
49 | 20 | which you can read more about in the Python Library Reference | 26 | which you can read more about in the Python Library Reference |
50 | 21 | (datetime.tzinfo). | 27 | (datetime.tzinfo). |
51 | 28 | |||
52 | 29 | Package: python3-tz | ||
53 | 30 | Architecture: all | ||
54 | 31 | Depends: tzdata, ${python3:Depends}, ${misc:Depends} | ||
55 | 32 | Description: Python3 version of the Olson timezone database | ||
56 | 33 | python-tz brings the Olson tz database into Python. This library allows | ||
57 | 34 | accurate and cross platform timezone calculations using Python 2.3 or higher. | ||
58 | 35 | It also solves the issue of ambiguous times at the end of daylight savings, | ||
59 | 36 | which you can read more about in the Python Library Reference | ||
60 | 37 | (datetime.tzinfo). | ||
61 | 38 | . | ||
62 | 39 | This package contains the Python 3 version of the library. | ||
63 | 22 | 40 | ||
64 | === modified file 'debian/copyright' | |||
65 | --- debian/copyright 2008-10-27 07:29:54 +0000 | |||
66 | +++ debian/copyright 2012-05-12 11:20:23 +0000 | |||
67 | @@ -1,60 +1,31 @@ | |||
128 | 1 | This package was debianized by Brian Sutherland <jinty@web.de> on | 1 | Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 |
129 | 2 | Tue, 8 Feb 2005 02:14:33 +0100. | 2 | Upstream-Name: pytz |
130 | 3 | 3 | Upstream-Contact: Stuart Bishop <stuart@stuartbishop.net> | |
131 | 4 | It was downloaded from http://pypi.python.org/pypi/pytz/ | 4 | Source: http://pypi.python.org/pypi/pytz/ |
132 | 5 | 5 | ||
133 | 6 | Copyright: | 6 | Files: * |
134 | 7 | 7 | Copyright: (c) 2003-2008 Stuart Bishop <stuart@stuartbishop.net> | |
135 | 8 | Upstream Author: Stuart Bishop <stuart@stuartbishop.net> | 8 | License: Expat |
136 | 9 | 9 | Permission is hereby granted, free of charge, to any person obtaining a | |
137 | 10 | This package is the result of an automatic generation from the Olsen database | 10 | copy of this software and associated documentation files (the "Software"), |
138 | 11 | (available from ftp://elsie.nci.nih.gov/pub). This means that there are two | 11 | to deal in the Software without restriction, including without limitation |
139 | 12 | licenses involved, that of the original distribution and the automatic | 12 | the rights to use, copy, modify, merge, publish, distribute, sublicense, |
140 | 13 | generation code. Fortunately both are BSD style. | 13 | and/or sell copies of the Software, and to permit persons to whom the |
141 | 14 | 14 | Software is furnished to do so, subject to the following conditions: | |
142 | 15 | Both are included here as they are quite different from the standard BSD style | 15 | . |
143 | 16 | license distributed with Debian. | 16 | The above copyright notice and this permission notice shall be included in |
144 | 17 | 17 | all copies or substantial portions of the Software. | |
145 | 18 | 18 | . | |
146 | 19 | License: | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
147 | 20 | 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
148 | 21 | The files of the original database distribution contain this license text: | 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
149 | 22 | 22 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
150 | 23 | /* | 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
151 | 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 |
152 | 25 | ** All rights reserved. | 25 | DEALINGS IN THE SOFTWARE. |
153 | 26 | ** | 26 | |
154 | 27 | ** Redistribution and use in source and binary forms are permitted | 27 | Files: pytz/zoneinfo/* |
155 | 28 | ** provided that the above copyright notice and this paragraph are | 28 | Copyright: Arthur David Olson et.al. <tz@elsie.nci.nih.gov> |
156 | 29 | ** duplicated in all such forms and that any documentation, | 29 | License: public-domain |
157 | 30 | ** advertising materials, and other materials related to such | 30 | Comment: excluded from binary package |
158 | 31 | ** distribution and use acknowledge that the software was developed | 31 | |
99 | 32 | ** by the University of California, Berkeley. The name of the | ||
100 | 33 | ** University may not be used to endorse or promote products derived | ||
101 | 34 | ** from this software without specific prior written permission. | ||
102 | 35 | ** THIS SOFTWARE IS PROVIDED ``AS IS' AND WITHOUT ANY EXPRESS OR | ||
103 | 36 | ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
104 | 37 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
105 | 38 | */ | ||
106 | 39 | |||
107 | 40 | And the automatic generation code license is: | ||
108 | 41 | |||
109 | 42 | Copyright (c) 2003-2008 Stuart Bishop <stuart@stuartbishop.net> | ||
110 | 43 | |||
111 | 44 | Permission is hereby granted, free of charge, to any person obtaining a | ||
112 | 45 | copy of this software and associated documentation files (the "Software"), | ||
113 | 46 | to deal in the Software without restriction, including without limitation | ||
114 | 47 | the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
115 | 48 | and/or sell copies of the Software, and to permit persons to whom the | ||
116 | 49 | Software is furnished to do so, subject to the following conditions: | ||
117 | 50 | |||
118 | 51 | The above copyright notice and this permission notice shall be included in | ||
119 | 52 | all copies or substantial portions of the Software. | ||
120 | 53 | |||
121 | 54 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
122 | 55 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
123 | 56 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
124 | 57 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
125 | 58 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
126 | 59 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
127 | 60 | DEALINGS IN THE SOFTWARE. | ||
159 | 61 | 32 | ||
160 | === modified file 'debian/patches/tzdata' | |||
161 | --- debian/patches/tzdata 2011-11-08 15:47:51 +0000 | |||
162 | +++ debian/patches/tzdata 2012-05-12 11:20:23 +0000 | |||
163 | @@ -1,3 +1,8 @@ | |||
164 | 1 | Description: Use system zone information from the tzdata package | ||
165 | 2 | Author: Kurt Roeckx <kurt@roeckx.be> | ||
166 | 3 | Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416202 | ||
167 | 4 | Forwarded: not-needed | ||
168 | 5 | |||
169 | 1 | Index: pytz-2011h/pytz/__init__.py | 6 | Index: pytz-2011h/pytz/__init__.py |
170 | 2 | =================================================================== | 7 | =================================================================== |
171 | 3 | --- pytz-2011h.orig/pytz/__init__.py 2011-10-21 15:14:54.048406509 +0900 | 8 | --- pytz-2011h.orig/pytz/__init__.py 2011-10-21 15:14:54.048406509 +0900 |
172 | 4 | 9 | ||
173 | === modified file 'debian/rules' (properties changed: +x to -x) | |||
174 | --- debian/rules 2012-02-28 10:36:56 +0000 | |||
175 | +++ debian/rules 2012-05-12 11:20:23 +0000 | |||
176 | @@ -1,14 +1,44 @@ | |||
177 | 1 | #!/usr/bin/make -f | 1 | #!/usr/bin/make -f |
178 | 2 | 2 | ||
179 | 3 | PACKAGE=python-tz | ||
180 | 4 | PACKAGE_PYTHON3=python3-tz | ||
181 | 5 | |||
182 | 6 | PYVERS:=$(shell pyversions -r) | ||
183 | 7 | PY3VERS:=$(shell py3versions -r) | ||
184 | 8 | |||
185 | 3 | %: | 9 | %: |
187 | 4 | dh --with python2 $@ | 10 | dh --with python2 --with python3 $@ |
188 | 11 | |||
189 | 12 | override_dh_auto_build: | ||
190 | 13 | dh_auto_build -p$(PACKAGE) | ||
191 | 14 | |||
192 | 15 | set -e; \ | ||
193 | 16 | for python in $(PY3VERS); do \ | ||
194 | 17 | $$python setup.py build; \ | ||
195 | 18 | done | ||
196 | 19 | |||
197 | 20 | override_dh_auto_install: | ||
198 | 21 | dh_auto_install -p$(PACKAGE) --destdir=$(CURDIR)/debian/$(PACKAGE) | ||
199 | 22 | |||
200 | 23 | set -ex; \ | ||
201 | 24 | for python in $(PY3VERS); do \ | ||
202 | 25 | $$python setup.py install --install-layout=deb \ | ||
203 | 26 | --root=$(CURDIR)/debian/$(PACKAGE_PYTHON3); \ | ||
204 | 27 | done | ||
205 | 28 | |||
206 | 29 | override_dh_clean: | ||
207 | 30 | dh_clean | ||
208 | 31 | rm -rf build | ||
209 | 5 | 32 | ||
210 | 6 | override_dh_install: | 33 | override_dh_install: |
211 | 7 | dh_install | 34 | dh_install |
212 | 35 | |||
213 | 8 | # install our testing package | 36 | # install our testing package |
214 | 9 | install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py | 37 | install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py |
215 | 38 | |||
216 | 10 | # remove zoneinfo, our patch to pytz makes it use the one from tzdata | 39 | # remove zoneinfo, our patch to pytz makes it use the one from tzdata |
217 | 11 | rm -rf debian/python-tz/usr/lib/python*/*-packages/pytz/zoneinfo | 40 | rm -rf debian/python-tz/usr/lib/python*/*-packages/pytz/zoneinfo |
218 | 41 | rm -rf debian/python3-tz/usr/lib/python*/*-packages/pytz/zoneinfo | ||
219 | 12 | 42 | ||
220 | 13 | #override_dh_auto_test: | 43 | #override_dh_auto_test: |
221 | 14 | # set -e ; for pyversion in $(shell pyversions -r); do $$pyversion $(CURDIR)/pytz/tests/test_tzinfo.py ; done | 44 | # set -e ; for pyversion in $(shell pyversions -r); do $$pyversion $(CURDIR)/pytz/tests/test_tzinfo.py ; done |
222 | 15 | 45 | ||
223 | === modified file 'debian/test-pytz' | |||
224 | --- debian/test-pytz 2008-10-27 07:29:54 +0000 | |||
225 | +++ debian/test-pytz 2012-05-12 11:20:23 +0000 | |||
226 | @@ -13,5 +13,5 @@ | |||
227 | 13 | tests += mod_tests | 13 | tests += mod_tests |
228 | 14 | 14 | ||
229 | 15 | if not errors: | 15 | if not errors: |
231 | 16 | print "Ran %s tests successfully." % tests | 16 | print("Ran %s tests successfully." % tests) |
232 | 17 | sys.exit(errors) | 17 | sys.exit(errors) |
233 | 18 | 18 | ||
234 | === modified file 'debian/watch' | |||
235 | --- debian/watch 2008-10-27 07:29:54 +0000 | |||
236 | +++ debian/watch 2012-05-12 11:20:23 +0000 | |||
237 | @@ -1,2 +1,2 @@ | |||
238 | 1 | version=3 | 1 | version=3 |
240 | 2 | http://pypi.python.org/pypi/pytz http://pypi.python.org/packages/source/p/pytz/pytz-(.*).tar.gz#md5=.* | 2 | http://pypi.python.org/packages/source/p/pytz/pytz-(.*).tar.gz |
241 | 3 | 3 | ||
242 | === modified file 'pytz.egg-info/SOURCES.txt' | |||
243 | --- pytz.egg-info/SOURCES.txt 2011-10-21 14:01:38 +0000 | |||
244 | +++ pytz.egg-info/SOURCES.txt 2012-05-12 11:20:23 +0000 | |||
245 | @@ -2,7 +2,6 @@ | |||
246 | 2 | LICENSE.txt | 2 | LICENSE.txt |
247 | 3 | MANIFEST.in | 3 | MANIFEST.in |
248 | 4 | README.txt | 4 | README.txt |
249 | 5 | setup.cfg | ||
250 | 6 | setup.py | 5 | setup.py |
251 | 7 | pytz/__init__.py | 6 | pytz/__init__.py |
252 | 8 | pytz/exceptions.py | 7 | pytz/exceptions.py |
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 for-upstream- changelog usr/share/ doc/python- tz/CHANGES. txt
W: python-tz: wrong-name-
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/ LibraryStyleGui de
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.