On Saturday 22 July 2006 04:51, Andrew Straw wrote: > The problem he's trying to solve is that the new Debian Python > policy allows a single directory tree of .py files (not the .pyc > and .pyo files) to serve all installed Python versions. The .pyc > files get placed in a separate tree which is, obviously, versioned.
Debian's been asking for this for a while now. The problem is that serving pyc/pyo files from a different location requires some ugly hacking on import.c As far as I'm aware, no-one has done that work. Or if they have, they haven't fed the changes back into Python that I've seen. As Phillip points out, this is a recipe for all sorts of pain. This is one of the issues I hope will be made better in Python 3 - until then, I'm very doubtful that the necessary work to change import to handle this in a sane and backwards compatible way will be done. Some small example - the __file__ attribute of a module might suddenly be different depending on whether you load from a pyc or a py file. Plenty of code uses this to load resources from the package directory where the code lives. There's also changes needed to make sure that any files that are compiled (or recompiled) to pyc get the pyc files written to the new, different, location. Anthony -- Anthony Baxter <[EMAIL PROTECTED]> It's never too late to have a happy childhood. _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
