Re: [Distutils] Pypy and site.py and makepath

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.

On Sat, Mar 13, 2010 at 01:54, P.J. Eby <pje@telecommunity.com> wrote:
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.
Well, I don't know if it does, but adding the makepath method from Pythons site.py seems to solve that problem anyway, and you get other errors. I don't have time to look into this very deeply, but Distribute/Setuptools seems to be a good test for cross-platform compatibility as it involves much magic. :) -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64

On Sat, Mar 13, 2010 at 10:13, Lennart Regebro <regebro@gmail.com> wrote:
Well, I don't know if it does, but adding the makepath method from Pythons site.py seems to solve that problem anyway, and you get other errors. I don't have time to look into this very deeply, but Distribute/Setuptools seems to be a good test for cross-platform compatibility as it involves much magic. :)
Well, PyPy distutils.sysconfig does not have a customize_compiler, so it breaks there anyway. But I realized something more: Could it be that in CPython, Pythons site.py is read in first and that context is retained when running a local site.py? Because now I again get the error that another method is missing (addsitedir) which does exist in Pythons site.py. It exists in PyPy's site.py as well, but not in distributes site.py. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64
participants (2)
-
Lennart Regebro
-
P.J. Eby