[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Thoughts on apps supporting multiple versions of python

On Sat, Apr 29, 2006 at 06:28:32PM -0300, Gustavo Noronha Silva wrote:

> Today I was playing with the idea of having gazpacho support multiple
> versions of Python. Nothing really forbids it, since it doesn't use
> anything that is specific to python2.4, for example.

> So I added gazpacho's module under python-support's control and made it
> not Depend on python >= 2.3 and python << 2.4. I have only:

> Depends: python-gtk2 (>= 2.6.0), python-support

Well, this seems wrong.  Your program still uses /usr/bin/python, right?  So
it still needs to depend on python.  Specifically, you can now make it
depend on python (>= 2.3) without the python (<< 2.4) part.  Or maybe this
should be python (>= 2.3), python (<< 2.5), if you don't yet know if your
program is compatible with later versions of python.

It seems that python-support itself also depends on python, but I don't
think you should be relying on a transitive dependency here.

> That means I'll have whatever python version is the default one, since
> python-gtk2 is supposed to depend on python2.3-gtk2, and will switch to
> python2.4-gtk2. So I'm guaranteeing gazpacho will work, but I'll also
> have the following situation: gazpacho supports python2.4 but will only
> run with that version if python2.4-gtk2 is installed.

> Maybe we need a way of telling python-support that 'I can run with the
> following versions, but will only be able to do that if this package
> supports them'.

If you have the proper dependency on python (>= 2.3), then depending on this
plus python-gtk2 is enough since python-gtk2 is understood to mean "the gtk2
bindings for the current version of /usr/bin/python" -- so depending on
python, python-gtk2 is guaranteed to give you a compatible pair, you won't
be able to upgrade to python (>= 2.4) until a version of python-gtk2 is also
available that's compatible with python 2.4.

BTW, it looks like python-gtk2 is missing a dependency of its own on python
(>= 2.3), python (<< 2.4) to enforce this...

> Also, to make python-gtk2 support more than one version, we could only
> achieve that by providing the extensions in a single package or building
> them on install time. Has anyone thought about this?

Sure, this has been discussed heavily over the past 6 months. 
Unfortunately, there has been no visible progress on getting something
specified and adopted for use in unstable.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/

Attachment: signature.asc
Description: Digital signature

Reply to: