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

Re: Status report on python2 transition



On Thu, Jul 05, 2001 at 07:56:57AM -0700, Neil Schemenauer wrote:
> Gregor Hoffleit wrote:
> > Sorry ? What problems do you have installing Python 2.1 in /usr/local on
> > a Debian system ?
> 
> Sometimes /usr/local/bin/python is used instead of /usr/bin/python.  For
> example, dput uses "#!/usr/bin/env python".  Also, its postinst script it
> does:
> 
>     python -c 'from compileall import main;main()' -q $DIR
> 
> which fails if a stock distribution of compileall is used (it doesn't
> support -q).  I've seen other packages do this as well.

Ok, I see. The postinst problem is my fault; the scripts certainly
should use an explicit path to a well-known python installation that
does support this.

I just browsed /usr/bin and /usr/sbin, and indeed there are plenty of
scripts that use "#!/usr/bin/env python". If we consider the possibility
that somebody installs non-compatible Python versions in the path, then
these are bugs in that packages. Thanks for pointing this out!

I guess we really, really need a Debian Python policy that mentions all
these things.


> > That's our current setup (well-behaved packages should have a dependency
> > on "python-base >= 1.5, python-base << 1.6"). Look at the mess we're now
> > running into, now that we want to upgrade this to Python 2.1.1. All
> > packages have to be recompiled at once.
> 
> What's a "well-behaved package"?  Extension modules depend on the
> version of Python that they were compiled against.  If you upgrade the
> interpreter you must upgrade the extensions.  How are you planning on
> avoiding this?

Binary extension modules depend on the version of Python that they were
compiled against (a different micro version should be ok, AFAIK). Pure
Python extension modules not necessarily depend on the version of Python
they were packaged for. There's a tricky situation wrt. byte-compilation
in postinst, but currently, this shouldn't hurt us (since on upgrading
python-base, site-packages is re-byte-compiled by an compileall.py
call).

s/not well-behaved/buggy/: Any binary Python extension package that
doesn't depend on 'python-base >= X.Y, python-base << X.Y+1' is buggy (a
few weeks ago I asked in debian-python for volunteers that filed bug
reports against those packages; don't know about the current status,
though). A pure Python extension package that installs stuff in
/usr/lib/pythonX.Y and doesn't have this dependency is also buggy. A
pure Python extension package that installs stuff in site-python
doesn't need a versioned dependency.


    Gregor



Reply to: