Merge lp:~mitya57/ubuntu/saucy/python-defaults/2.7.5-5ubuntu1 into lp:ubuntu/saucy/python-defaults

Proposed by Dmitry Shachnev
Status: Approved
Approved by: Barry Warsaw
Approved revision: 107
Proposed branch: lp:~mitya57/ubuntu/saucy/python-defaults/2.7.5-5ubuntu1
Merge into: lp:ubuntu/saucy/python-defaults
Diff against target: 203 lines (+71/-15)
12 files modified
Makefile (+1/-1)
debian/changelog (+20/-0)
debpython/version.py (+1/-1)
dh_python2.py (+36/-0)
dh_python2.sh (+0/-9)
pyclean.rst (+1/-0)
pycompile.rst (+2/-1)
tests/common.mk (+1/-1)
tests/t1/Makefile (+2/-0)
tests/t2/Makefile (+3/-2)
tests/t4/Makefile (+2/-0)
tests/t6/Makefile (+2/-0)
To merge this branch: bzr merge lp:~mitya57/ubuntu/saucy/python-defaults/2.7.5-5ubuntu1
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+185620@code.launchpad.net

Description of the change

This merges an important bugfix from Debian [1], and brings us closer to Debian (there is only one remaining change).

[1]: http://lists.debian.org/debian-python/2013/08/msg00012.html
     http://lists.debian.org/debian-python/2013/08/msg00013.html

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

Thanks!

review: Approve

Unmerged revisions

107. By Dmitry Shachnev

Add a changelog entry

106. By Dmitry Shachnev

Merge lp:debian/python-defaults

105. By Steve Langasek

releasing package python-defaults version 2.7.5-4ubuntu2

104. By Steve Langasek

Adjust debpython/depends.py to be multiarch-friendly. Closes: #722046.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2013-08-19 11:46:54 +0000
3+++ Makefile 2013-09-14 10:16:35 +0000
4@@ -17,7 +17,7 @@
5 $(INSTALL) -m 755 runtime.d/* $(DESTDIR)$(PREFIX)/share/python/runtime.d/
6 $(INSTALL) -m 644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/
7 $(INSTALL) -m 755 dh_python2 $(DESTDIR)$(PREFIX)/share/python/
8- $(INSTALL) -m 755 dh_python2.sh $(DESTDIR)$(PREFIX)/bin/dh_python2
9+ $(INSTALL) -m 755 dh_python2.py $(DESTDIR)$(PREFIX)/bin/dh_python2
10 $(INSTALL) -m 644 python2.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
11
12 install-runtime:
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2013-09-12 20:36:15 +0000
16+++ debian/changelog 2013-09-14 10:16:35 +0000
17@@ -1,3 +1,23 @@
18+python-defaults (2.7.5-5ubuntu1) saucy; urgency=low
19+
20+ * Merge with Debian unstable, remaining change:
21+ - Set minimal required python version to 2.7.1.
22+
23+ -- Dmitry Shachnev <mitya57@ubuntu.com> Sat, 14 Sep 2013 14:10:23 +0400
24+
25+python-defaults (2.7.5-5) unstable; urgency=low
26+
27+ [ Steve Langasek ]
28+ * Adjust debpython/depends.py to be multiarch-friendly.
29+
30+ [ Piotr Ożarowski ]
31+ * Set "Multi-Arch: allowed" in python, python-dev, python-minimal,
32+ python-dbg, python-all, python-all-dev, python-all-dbg
33+ * Replace /usr/bin/dh_python2 with a Python script that invokes
34+ dh-python's dh_python2 if Build-Depends{,-Indep} contains dh-python
35+
36+ -- Piotr Ożarowski <piotr@debian.org> Thu, 12 Sep 2013 21:25:01 +0200
37+
38 python-defaults (2.7.5-4ubuntu2) saucy; urgency=low
39
40 * Adjust debpython/depends.py to be multiarch-friendly. Closes: #722046.
41
42=== modified file 'debpython/version.py'
43--- debpython/version.py 2013-08-19 11:46:54 +0000
44+++ debpython/version.py 2013-09-14 10:16:35 +0000
45@@ -67,7 +67,7 @@
46 :type available: bool
47
48 >>> sorted(get_requested_versions([(2, 5), (3, 0)]))
49- [(2, 6), (2, 7)]
50+ [(2, 7)]
51 >>> sorted(get_requested_versions('')) == sorted(SUPPORTED)
52 True
53 >>> sorted(get_requested_versions([None, None])) == sorted(SUPPORTED)
54
55=== added file 'dh_python2.py'
56--- dh_python2.py 1970-01-01 00:00:00 +0000
57+++ dh_python2.py 2013-09-14 10:16:35 +0000
58@@ -0,0 +1,36 @@
59+#! /usr/bin/python
60+
61+from os.path import exists
62+from subprocess import call
63+from sys import argv
64+from re import compile
65+
66+OLD = '/usr/share/python/dh_python2'
67+NEW = '/usr/share/dh-python/dh_python2'
68+has_dhpython = compile(r'(^|:|\s|,)dh-python($|\s|,|\()').search
69+
70+binary = OLD
71+if exists(NEW) and exists('debian/control'):
72+ with open('debian/control', 'r') as fp:
73+ inside = False
74+ for line in fp:
75+ if not line:
76+ break
77+ line_lower = line.lower()
78+ if inside:
79+ if line.startswith((' ', "\t")):
80+ if has_dhpython(line):
81+ binary = NEW
82+ break
83+ continue
84+ elif line.startswith('#'):
85+ continue
86+ inside = False
87+ if line_lower.startswith(('build-depends:', 'build-depends-indep:')):
88+ if has_dhpython(line):
89+ binary = NEW
90+ break
91+ inside = True
92+
93+argv[0] = binary
94+exit(call(argv))
95
96=== removed file 'dh_python2.sh'
97--- dh_python2.sh 2013-08-02 08:54:32 +0000
98+++ dh_python2.sh 1970-01-01 00:00:00 +0000
99@@ -1,9 +0,0 @@
100-#! /bin/sh
101-
102-if [ -f /usr/share/dh-python/dh_python2 ] &&\
103- grep -q dh-python ./debian/control 2>/dev/null
104-then
105- exec /usr/share/dh-python/dh_python2 $@
106-else
107- exec /usr/share/python/dh_python2 $@
108-fi
109
110=== modified file 'pyclean.rst'
111--- pyclean.rst 2013-08-19 11:46:54 +0000
112+++ pyclean.rst 2013-09-14 10:16:35 +0000
113@@ -24,3 +24,4 @@
114 -q, --quiet be quiet
115
116 -p PACKAGE, --package=PACKAGE specify Debian package name to clean
117+ (combining with DIR_OR_FILE will additionally limit list of files)
118
119=== modified file 'pycompile.rst'
120--- pycompile.rst 2013-08-19 11:46:54 +0000
121+++ pycompile.rst 2013-09-14 10:16:35 +0000
122@@ -35,7 +35,8 @@
123 -v, --verbose turn verbose mode on
124
125 -p PACKAGE, --package=PACKAGE specify Debian package name whose files should
126- be bytecompiled
127+ be bytecompiled (combining with DIR_OR_FILE will additionally limit list of
128+ files)
129
130 -V VRANGE force private modules to be bytecompiled with Python
131 version from given range, regardless of the default Python version in the
132
133=== modified file 'tests/common.mk'
134--- tests/common.mk 2012-10-21 22:40:55 +0000
135+++ tests/common.mk 2013-09-14 10:16:35 +0000
136@@ -1,7 +1,7 @@
137 #!/usr/bin/make -f
138
139 export DEBPYTHON_DEFAULT ?= $(shell sed -rne 's,^default-version = python(.*),\1,p' ../../debian/debian_defaults)
140-export DEBPYTHON_SUPPORTED ?= $(shell sed -rne '/^supported-versions/{s/^supported-versions = (.*)/\1/g;s/python//g}' ../../debian/debian_defaults)
141+export DEBPYTHON_SUPPORTED ?= $(shell sed -rne '/^supported-versions/{s/^supported-versions = (.*)/\1/g;s/python//gp}' ../../debian/debian_defaults)
142
143 all: run check
144
145
146=== modified file 'tests/t1/Makefile'
147--- tests/t1/Makefile 2012-12-12 09:17:34 +0000
148+++ tests/t1/Makefile 2013-09-14 10:16:35 +0000
149@@ -6,7 +6,9 @@
150 check:
151 grep -q "Depends: .*python-mako" debian/python-foo/DEBIAN/control
152 grep -q 'python-foo (>= 2:0.1~rc2)' debian/python-foo/DEBIAN/control
153+ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
154 test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/__init__.py
155+endif
156 test ! -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/spam.py
157 grep -q "Depends: .*python (<<" debian/python-foo/DEBIAN/control
158 [ "`readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/absolute_link_to_tmp`" = "/tmp" ]
159
160=== modified file 'tests/t2/Makefile'
161--- tests/t2/Makefile 2012-06-30 20:23:59 +0000
162+++ tests/t2/Makefile 2013-09-14 10:16:35 +0000
163@@ -1,10 +1,11 @@
164 #!/usr/bin/make -f
165
166 include ../common.mk
167+DPY=$(DEBPYTHON_DEFAULT)
168 clean: clean-common
169
170 check:
171- test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo.py
172- test -f debian/python-foo/usr/lib/python2.6/dist-packages/bar/bar.py
173+ test -f debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo.py
174+ test -f debian/python-foo/usr/lib/python$(DPY)/dist-packages/bar/bar.py
175 grep -q pycompile debian/python-foo/DEBIAN/postinst
176 grep -q pyclean debian/python-foo/DEBIAN/prerm
177
178=== modified file 'tests/t4/Makefile'
179--- tests/t4/Makefile 2012-06-30 20:23:59 +0000
180+++ tests/t4/Makefile 2013-09-14 10:16:35 +0000
181@@ -5,7 +5,9 @@
182
183 check:
184 grep -q python2.6 debian/foo/usr/share/foo/foo.py
185+ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
186 grep -q Depends:.*python2.6 debian/foo/DEBIAN/control
187+endif
188 #grep -q python2.5 debian/foo/usr/share/bar/bar.py
189 #grep -q Depends:.*python2.5 debian/foo/DEBIAN/control
190 grep -q python2.4 debian/foo/usr/share/foo/baz.py
191
192=== modified file 'tests/t6/Makefile'
193--- tests/t6/Makefile 2012-11-28 14:50:19 +0000
194+++ tests/t6/Makefile 2013-09-14 10:16:35 +0000
195@@ -13,6 +13,8 @@
196 grep -q '\-V 2.5 /usr/share/bar25' debian/foo/usr/share/python/runtime.d/foo.rtupdate
197 grep -q '/usr/share/bar25 \-V 2.5' debian/foo/DEBIAN/postinst
198 # python2.6 hardcoded via shebang
199+ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
200 grep -q Depends:.*python2.6 debian/foo/DEBIAN/control
201 grep -q '\-V 2.6 /usr/share/foo' debian/foo/usr/share/python/runtime.d/foo.rtupdate
202 grep -q '/usr/share/foo \-V 2.6' debian/foo/DEBIAN/postinst
203+endif

Subscribers

People subscribed via source and target branches