Skip navigation.
Home

Coping with Python 3

Some distributions (e.g. Arch Linux) have decided to make the "python" command run Python 3 by default. This is a problem for us, because Python 3 is not compatible with Python 2. Most Python ROX applications start like this (e.g. Edit/AppRun):

#!/usr/bin/env python

On Arch Linux, these programs will now fail to start. We can't change the line to run "python2", because that doesn't exist on other systems (e.g. Debian).

To solve this, I've added a 0install feed for Python. If your feed currently looks like this:

  <group main="AppRun">
    <implementation ...>
    ...

change it to:

  <group main="AppRun">
    <command name='run' path='AppRun'>
      <runner interface='http://repo.roscidus.com/python/python'>
	<version before='3'/>
      </runner>
    </command>

    <implementation ...>
    ...

0launch versions before 0.53 will ignore the command element and use the "main" attribute as before. 0.53 and later versions (0.54 is recommended) will select a suitable version of Python and use that to run the AppRun file.

(note that this will currently only ever select a distribution version of Python; it's just that it will now pick the right command for you)

So far, I've only updated Edit's feed. If that doesn't cause any problems, I'll update the others too.

Syndicate content