Pypy and site.py and makepath
What exactly is site.py for? I tried installing Distribute with PyPy, and it fails, because if you start it, it runs site.py, and site.py uses makepath, but doesn't import or define it, so it fails. Running the tests with python2.6 and it seems site.py is never run, but removing it makes the tests fail. Any insight into this? -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64
On Fri, Mar 12, 2010 at 3:20 PM, Lennart Regebro <regebro@gmail.com> wrote:
What exactly is site.py for?
site.py is run when your interpreter starts. It loads a few things in the builtins, and add some paths in sys.path (like per-user paths, etc)
I tried installing Distribute with PyPy, and it fails, because if you start it, it runs site.py, and site.py uses makepath, but doesn't import or define it, so it fails.
Running the tests with python2.6 and it seems site.py is never run, but removing it makes the tests fail.
Any insight into this?
the tests in py26@CPYthon definitely runs site.py, but since its before the interpreter is fully available, I am not sure if you can trace it easily. now for PyPy, I am not sure how the stdlib works with it. Isn't that forked ?
-- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Tarek Ziadé | http://ziade.org
On Fri, Mar 12, 2010 at 12:20 PM, Lennart Regebro <regebro@gmail.com> wrote:
What exactly is site.py for? I tried installing Distribute with PyPy, and it fails, because if you start it, it runs site.py, and site.py uses makepath, but doesn't import or define it, so it fails.
Eh? I see def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) around line 75 of site.py in the python 2.6 source tree. Maybe PyPy has its own broken copy?
Running the tests with python2.6 and it seems site.py is never run,
How do you know?
but removing it makes the tests fail.
Any insight into this?
-- --Guido van Rossum (python.org/~guido)
On Sat, Mar 13, 2010 at 00:35, Guido van Rossum <guido@python.org> wrote:
around line 75 of site.py in the python 2.6 source tree. Maybe PyPy has its own broken copy?
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.
Running the tests with python2.6 and it seems site.py is never run,
How do you know?
Because no matter what I stick in it, prints, exceptions, set_trace(), syntax errors; nothing happens. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64
participants (3)
-
Guido van Rossum
-
Lennart Regebro
-
Tarek Ziadé