Re: version independent pythin packages: ?
On Thu, Aug 07, 2003 at 11:34:27AM +0100, Ricardo Javier Cardenes Medina wrote:
> Thinking on this problem a bit further (not feasible with current
> implementation), wouldn't it be nice if the user could enable Python
> (via environment or command line switch) to use some local repository
> (~/.python/X.Y/) to store .py{c,o} files if (s)he hasn't write access to
> the system files?
You always can copy the .py[co] files in
/usr/lib/python2.X/site-packages at install time. Since these directory
come before /usr/lib/site-python in the default sys.path, the compiled
modules will be used on import.
Now this has some unpleasant consequences:
* python no longer has a way of seeing if the .pyc is up to date
* I think this screws up the exception reporting routines in python
Maybe this could be handled with symlinks?
--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations
Reply to: