Merge lp:~barry/ubuntu/oneiric/python-support/merge1.0.13 into lp:ubuntu/oneiric/python-support

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 33
Proposed branch: lp:~barry/ubuntu/oneiric/python-support/merge1.0.13
Merge into: lp:ubuntu/oneiric/python-support
Diff against target: 147 lines (+63/-14)
6 files modified
debian/changelog (+38/-0)
debian/control (+1/-1)
debian/python-support.lintian-overrides (+1/-0)
movemodules (+1/-1)
pysupport.py (+9/-4)
tests/testparseversions.py (+13/-8)
To merge this branch: bzr merge lp:~barry/ubuntu/oneiric/python-support/merge1.0.13
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Ubuntu branches Pending
Review via email: mp+62534@code.launchpad.net

Description of the change

===========
Merge notes
===========

Debian version: 1.0.13
Ubuntu version: 1.0.10ubuntu3

Differences
===========

debhelper/dh_pysupport
----------------------

* Debian version now looks for supported versions in
  /usr/share/python/debian_defaults instead of hardcoding them.
  status: adopt debian change

* Ubuntu add a --prefix option
  * documentation needs grammatical fixes
  * do we have documented use cases?
  * why has change not been pushed to debian?
  * how to test this?
  status: keep Ubuntu changes, but clean up documentation.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

The change looks good to me!

As per the --prefix:
- this is a short time solution. As you probably now, I was focused on other things last cycle (unity? :p) but still had an action for the "update stable applications in extras.ubuntu.com". The outcome of the discussion (where I wasn't involved in) was the applications in extras.ubuntu.com would install in /opt/extras.ubuntu.com/<application-name>-version/

So, we needed some way to install and link python modules from there, hence the --prefix solution (just had an evening to link and to make those things work out). This is call by the "submitubuntu" command in Quickly, which call a special argument in python-distutils-extra which generates some CDBS rules which call this option. So yeah, this solution is spread across 4 packages.

I didn't have the time to get a deeper look (and still think it's the right solution). That's why it wasn't pushed to debian. Anymore, if we want to push that to debian, we have to support all python build systems (dh_python* in particular).

If you want to test it:
install quickly
quickly create ubuntu-application foo
quickly submitubuntu

I still think that's not the rigth solution and we need a better story at the packaging level itself for installing out of prefix, support menu browsing (like dbus services, desktop files…) and not rely on the current symlink solution.

The thing is that I'm not sure anyone is assigned to get that story better this cycle.

Hope that makes things clear :)

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

It does very much, thanks! I'll clean up the help string in dh_pysupport, and elaborate on the reason for the Ubuntu-specific change in the changelog file. That will do for now (especially since we want to eradicate pysupport anyway :).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-11-11 14:02:13 +0000
3+++ debian/changelog 2011-05-26 18:37:31 +0000
4@@ -1,3 +1,41 @@
5+python-support (1.0.13ubuntu1) oneiric; urgency=low
6+
7+ * Merge with Debian; remaining changes:
8+ - movemodules, update-python-modules, debhelper/dh_pysupport:
9+ add support for --prefix
10+
11+ -- Barry Warsaw <barry@ubuntu.com> Thu, 26 May 2011 14:24:43 -0400
12+
13+python-support (1.0.13) unstable; urgency=low
14+
15+ [ Loïc Minier ]
16+ * tests/testparseversions.py: don't hardcode expected versions; instead,
17+ compare with pyversions' output.
18+ * pysupport.py: don't hardcode supported and old versions; instead, parse
19+ debian_defaults; NB: this removes some very old python versions from the
20+ list (2.1 and 2.2), but these weren't ever support and aren't supported in
21+ the previous stable release anyway. Depend on python-minimal as
22+ debian_defaults is accessed directly.
23+
24+ [ Piotr Ożarowski ]
25+ * Upload to unstable (closes: #622906)
26+ * Add lintian override for depends-on-python-minimal
27+
28+ -- Piotr Ożarowski <piotr@debian.org> Fri, 15 Apr 2011 21:14:04 +0200
29+
30+python-support (1.0.12) experimental; urgency=low
31+
32+ * Add support for python2.7.
33+ * Move python2.4 to old versions.
34+
35+ -- Piotr Ożarowski <piotr@debian.org> Mon, 18 Oct 2010 19:51:21 +0200
36+
37+python-support (1.0.11) unstable; urgency=low
38+
39+ * Move python2.4 to old versions.
40+
41+ -- Piotr Ożarowski <piotr@debian.org> Tue, 19 Oct 2010 17:20:22 +0200
42+
43 python-support (1.0.10ubuntu3) natty; urgency=low
44
45 * movemodules, update-python-modules, debhelper/dh_pysupport:
46
47=== modified file 'debian/control'
48--- debian/control 2010-10-13 17:10:04 +0000
49+++ debian/control 2011-05-26 18:37:31 +0000
50@@ -12,7 +12,7 @@
51
52 Package: python-support
53 Architecture: all
54-Depends: python (>= 2.5), dpkg (>= 1.14.19), ${misc:Depends}
55+Depends: python (>= 2.5), python-minimal, dpkg (>= 1.14.19), ${misc:Depends}
56 Conflicts: debhelper (<< 5.0.38)
57 Description: automated rebuilding support for Python modules
58 This package contains the 'update-python-modules' script, which takes
59
60=== added file 'debian/python-support.lintian-overrides'
61--- debian/python-support.lintian-overrides 1970-01-01 00:00:00 +0000
62+++ debian/python-support.lintian-overrides 2011-05-26 18:37:31 +0000
63@@ -0,0 +1,1 @@
64+python-support: depends-on-python-minimal depends
65
66=== modified file 'movemodules'
67--- movemodules 2010-11-11 14:02:13 +0000
68+++ movemodules 2011-05-26 18:37:31 +0000
69@@ -221,7 +221,7 @@
70 files.update(files2)
71 pyversions.update(pyversions2)
72
73-# <prefix>/share/python-support/$package
74+ # <prefix>/share/python-support/$package
75 if os.path.isdir(os.path.join(basedir, "%s/share/python-support" % prefix)):
76 for ent in os.listdir(os.path.join(basedir, "%s/share/python-support" % prefix)):
77 if os.path.isdir(os.path.join(basedir, "%s/share/python-support" % prefix, ent)):
78
79=== modified file 'pysupport.py'
80--- pysupport.py 2010-10-20 14:15:18 +0000
81+++ pysupport.py 2011-05-26 18:37:31 +0000
82@@ -1,10 +1,15 @@
83 import os
84-
85-# Do not get the version list from pyversions, it isn't reliable
86-py_supported = ['python2.6', 'python2.7']
87+from ConfigParser import SafeConfigParser
88+
89+config = SafeConfigParser()
90+config.readfp(file('/usr/share/python/debian_defaults'))
91+versions = config.get('DEFAULT', 'supported-versions')
92+py_supported = [s.strip() for s in versions.split(',')]
93+versions = config.get('DEFAULT', 'old-versions')
94+py_oldversions = [s.strip() for s in versions.split(',')]
95+
96 py_installed = [ ver for ver in py_supported if os.access('/usr/bin/'+ver,os.X_OK) ]
97 py_supported_short = [ a.replace("python","") for a in py_supported ]
98-py_oldversions = ['python2.1','python2.2','python2.3', 'python2.4', 'python2.5']
99
100 def version_cmp(ver1,ver2):
101 v1=[int(i) for i in ver1.split('.')]
102
103=== modified file 'tests/testparseversions.py'
104--- tests/testparseversions.py 2010-10-20 14:15:18 +0000
105+++ tests/testparseversions.py 2011-05-26 18:37:31 +0000
106@@ -4,28 +4,33 @@
107 import subprocess
108
109 class TestParseVersions(unittest.TestCase):
110- def get_output(self, control):
111- subp = subprocess.Popen(["parseversions", "--pycentral", control],
112- stdout=subprocess.PIPE)
113+ @staticmethod
114+ def get_output(args):
115+ subp = subprocess.Popen(args, stdout=subprocess.PIPE)
116 output = subp.communicate()[0]
117 if subp.returncode != 0:
118 raise RuntimeError, subp.returncode
119 return output
120
121+ def pv_output(self, control):
122+ return TestParseVersions.get_output(["parseversions", "--pycentral", control])
123+
124 def test_regular(self):
125- self.assertEqual(self.get_output('testparseversions.regular.control'), '2.6 2.7\n')
126+ self.assertEqual(self.pv_output('testparseversions.regular.control'),
127+ TestParseVersions.get_output(['pyversions', '--supported', '-v']))
128
129 def test_leading_newline(self):
130- self.assertEqual(self.get_output('testparseversions.leading-newline.control'), '2.6 2.7\n')
131+ self.assertEqual(self.pv_output('testparseversions.leading-newline.control'),
132+ TestParseVersions.get_output(['pyversions', '--supported', '-v']))
133
134 def test_missing(self):
135- self.assertRaises(RuntimeError, self.get_output, 'testparseversions.missing.control')
136+ self.assertRaises(RuntimeError, self.pv_output, 'testparseversions.missing.control')
137
138 def test_second_paragraph(self):
139- self.assertRaises(RuntimeError, self.get_output, 'testparseversions.second-paragraph.control')
140+ self.assertRaises(RuntimeError, self.pv_output, 'testparseversions.second-paragraph.control')
141
142 def test_spaces(self):
143- self.assertRaises(RuntimeError, self.get_output, 'testparseversions.spaces.control')
144+ self.assertRaises(RuntimeError, self.pv_output, 'testparseversions.spaces.control')
145
146 if __name__ == '__main__':
147 unittest.main()

Subscribers

People subscribed via source and target branches

to all changes: