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

Re: Bug#382252: Python PATH problem



On Wed, 03 Jan 2007 14:19:21 +0100, Pierre Habouzit wrote:
>> 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).

Of course, that would be cleaner. I think this also is the way that
Debian's Common Lisp infrastructure works... optimised files are
created in (more or less)
/var/cache/common-lisp-controller/$user/$implementation/$path.

But it doesn't matter where the optimised python files are stored, as long
as the interpreter knows to ignore them if their corresponding python
source files have been removed. :)

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078



Reply to: