Python version indication
michael at bienia.de
Mon Nov 30 22:51:49 GMT 2009
On 2009-11-30 23:10:43 +0100, Tim Michelsen wrote:
> >> What do I need to change in my control file in order to get only the
> >> Python 2.6 files installed on systems where 2.6 is the default Python
> >> version?
> > Does it make the package that bigger that you don't want it? Do you have
> > a reason for not supporting python2.5?
> I want to support all the same Python versions supported by the upstream
> But on Karmic, 2.6 should be given preference whereas on earliere
> systems maybe 2.5.
The package "python" pulls in the default python version (python2.6 for
karmic). So if you get the dependencies right, it will pull in the
default python version (but will also continue to work with other python
versions installed as long as the package supports them).
> One of my users reported at install:
> Setting up python2.5-minimal (2.5.4-1ubuntu6) ...
> Linking and byte-compiling packages for runtime python2.5...
> /usr/lib/python2.5/site-packages/Onboard/KeyboardSVG.py:104: Warning:
> 'with' will become a reserved keyword in Python 2.6
> Compiling /usr/lib/python2.5/site-packages/Onboard/KeyboardSVG.py ...
> File "/usr/lib/python2.5/site-packages/Onboard/KeyboardSVG.py", line
> with open(pane_svg_filename) as svg_file:
> SyntaxError: invalid syntax
> Any Idea?
Unless the package you speak about is onboard, then it's not a bug in
You might need to check if your package has an explicit dependency on
python2.5 though. This usually happens because a .py file explicitly
wants python2.5 as interpreter. Some install scripts hardcode a
versioned python interpreter when building for a specific python version
and if those files ends in the deb you get a dependency on that python
Unless there is specific reason to use a versioned python interpreter,
you can change it back to an unversioned one and the package should then
depend only on python.
More information about the Ubuntu-motu