Re: Using python + pygtk in Desktop modules (was Re: Revisitingthe Gnome Bindings)



On Tue, 2004-09-28 at 09:42 -0400, Sean Middleditch wrote:
> No packaging system that I am aware of handles situations like Python's
> (or the kernels, or GStreamer's, or any other framework's) either.
> Namely, say you have the framework package of a particular version
> installed; python-2.3.  And then you have a versioned library installed
> for this framework; say, pygtk-2.3-2.4.  (pygtk 2.4 for python 2.3)  Now
> an upgrade of python comes along to 2.4.  The system should see that to
> install python 2.4, you need the matching pygtk-2.4-2.4 package in order
> to make sure all apps keep working.  No packaging system can do this,
> however.  Just like pretty much every packaging system will let you
> upgrade your kernel without requiring you to upgrade any drivers you
> have installed, potentially going so far as to cause the new kernel to
> not even boot.

Debian works quite well here.

Any Debian release has a default python version (eg, for stable this is
python2.1, unstable currently uses python2.3).  Extensions are always
available for the default release, but are also available for other
releases (either older or newer than the default release).

Debian's python policy is that all python extension packages should be
versioned so that they may be installed in parallel: eg, python2.1-gtk2,
python2.2-gtk2, and python2.3-gtk2 exist, and do not conflict (they will
typically install libraries under /usr/lib/pythonX.Y/)

There is always also a non-versioned dependency package available for
each python extension. For example, a user would install python-gtk2 to
get python bindings for gtk installed.  This dependency package contains
no code - it simply depends on one of the pythonVERSION-gtk2 packages.

If an application using a python extension does not depend on a
particular version of python, it simply depends on the dependency
packages, to ensure that the default version of the python extension is
available.  If it depends on a feature of a particular python release,
it depends on the exact package providing the extension for that release
(and uses /usr/bin/python<X>.<Y> in its #! line to ensure that it runs
using the correct python version).  This allows the python interpreter
to be upgraded without breaking applications.

Before the default python version for a release is changed, all
important extension packages must be available for the new version, so
no applications depending on these packages will break after the
release.

After the default python version has been changed, a user running "apt-
get upgrade" will have all the new python packages installed
automatically.  If the old packages are not specifically depended on by
an application, they can be detected and removed by deborphan.

I've never had problems in debian involving the use of a python
extension provided by a debian package: the above system ensures that
the extension versions are always available.

-- 
Richard Boulton <richard tartarus org>




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