On Wed, Jan 03, 2007 at 01:10:42PM +0000, Sam Morris wrote: > Josselin Mouette wrote: > > mdiff.py does "import bdiff" which looks for bdiff.so in the same > > directory. On your system, mdiff.py is is > > in /var/lib/python-support/python2.4/mercurial/ which is the correct > > place for packages handled by python-support, while on the user's system > > it is in /usr/lib/python2.4/site-packages/mercurial/. Therefore you need > > to understand how the file ended up in this place. > > Wouter Cloetens wrote: > >> $ ls -l /usr/lib/python*/site-packages/mercurial/ > > > > -rw-r--r-- 1 root root 134 Jun 1 2006 __init__.pyc > > -rw-r--r-- 1 root root 168 Jun 1 2006 __version__.pyc > > -rw-r--r-- 1 root root 5494 Jun 1 2006 appendfile.pyc > > -rw-r--r-- 1 root root 7589 Jun 1 2006 archival.pyc > > ... etc ... > > This is #397111 cropping up again. Python really shouldn't import modules > from .pyc and .pyo files unless the original .py file still exists > alongside them. that's not really it. The thing is python should not build .pyc/.pyo alongside the files for public modules but parallel to the install, e.g. in /var/lib/python/pyc2.4/. what's crappy is the necessity for the .pyc to be in the exact same directory than the .py (or a symlink to it). -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org
Attachment:
pgpU1j20K03p9.pgp
Description: PGP signature