[Distutils] Pypy and site.py and makepath

P.J. Eby pje at telecommunity.com
Sat Mar 13 01:54:52 CET 2010


At 12:45 AM 3/13/2010 +0100, Lennart Regebro wrote:
>No, it's the site.py in the Distribute tree I'm talking about. Sorry
>for being unclear about this. It may be a broken copy, yes.

Since distribute is a fork of the 0.6 branch of setuptools, it's 
presumably the special site.py loader (called 
setuptools/site-patch.py in the 0.7 trunk) that's used for making 
PYTHONPATH directories support .pth files.  It's placed in PYTHONPATH 
directories used with easy_install, and it expects to find another 
'site' module loadable on sys.path.

It was done this way because it needed to see an unmangled sys.path 
before the site module gets a hold of it, and because it couldn't 
simply *replace* the site module without interfering with Linux 
distro-specific patches to the site module to add in additional 
site-package directories in various nonstandard ways that would be 
better done in .pth files to begin with.  ;-)

Anyway, if PyPy includes a precompiled or "builtin" site module of 
some kind, it's unlikely that the patch file would work correctly, 
even if PyPy allows executing a custom site.py.



More information about the Distutils-SIG mailing list