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

Re: python again (was: Bug#225999: ITP: debsync -- installed packages synchronization tool)



On Mon, 2004-01-05 at 12:15, John Goerzen wrote:
> On Mon, Jan 05, 2004 at 11:39:03AM -0600, John Goerzen wrote:
> > I am of the opinion that versioned dependencies are used far too often
> > on Debian, and that they are also forced upon us too often by packages
> > that install into directories for specific Python versions.
> > 
> > For instance, on my system, I have
> > /usr/lib/python2.3/site-packages/debconf.py.  This is a pure Python
> > module and it has no business being in /usr/lib/python2.3/site-packages.
> > It should be in /usr/lib/site-python, so that it will be visible to any
> > version of Python.  If it requires feature specific to Python 2.3, it
> > could Depend on python (>= 2.3) and leave it at that.  This would
> > greatly simplify the problem.
> 
> I should add that the problem in this case does not end with debconf.
> Any package that requires debconf.py must now be written to depend
> specifically on python2.3, call python2.3 in its bang-path, etc.
> Alternatively, it must depend on python (<<2.4) or conflict on python
> (>=2.4) since it must have the /usr/bin/python that is 2.3.  Neither of
> these solutions are great.
> 
> This is also the case with many other packages.  There are a lot of
> unnecessary dependencies on specific Python versions out there.

This is unfortunately currently encouraged (actually, it's a "must", but
I suspect my packages aren't the only ones violating it) by Python
policy, the reason being that Python automatically compiles modules it
loads, and the bytecompiled modules are (understandably) different
between versions. Therefore, you can't have a test.py in a
version-independent directory because it might have a test.pyc from 2.1,
but you run something with 2.2. In reality, this is a small problem --
you have a small speed hit as the file is regenerated, or ignored if you
can't write to it.

http://lists.debian.org/debian-python/2003/debian-python-200308/msg00133.html

This is stupid, and IMO a critical (or at least important) bug in the
Python interpreter.

dh_python doesn't generated unversioned dependencies either.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=174288
-- 
Joe Wreschnig <piman@debian.org>

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: