[pypy-dev] Fork lib and pythonpath?

logistix vze55z8s at verizon.net
Mon Mar 3 03:37:06 CET 2003

First off, apologies if this shows up as a dupe post.  I posted via
gmane.org about 6 hours ago and it never showed up.

This brief interactive session scares me a little.


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\grant>cd

C:\Python22\Lib\site-packages\pypy\interpreter>python interactive.py
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] in pypy
PyPyConsole / TrivialObjSpace
>>> import sys
>>> sys.path
['', 'C:\\Python22\\lib\\site-packages\\Pythonwin',
kages\\win32', 'C:\\Python22\\lib\\site-packages\\win32\\lib',
b\\site-packages', 'c:\\python22\\DLLs', 'c:\\python22\\lib',
\\lib-tk', 'c:\\python22']


I'm thinking we should fork the whole lib directory into pypy and have
interpreter's pythonpath point there, bypassing Cpython's pythonpath

I'm trying to get the pure-python bytecode compiler package in order.
python distribution already goes 80% of the way.  I've got a plugin
replacement for parser.pyd.  But where do I stick it so it's found
the pyd? I also want to write a interim version of tokenizer.py.  The
current version uses regexes.  This is the way we should ultimately do
but a pure python DFA would be nice while dependancies are being worked
(although slow as hell).  I could just drop that in the lib directory,
then we're running against a patched version of CPython.

The only other alternative is to insert something into pythonpath before
of the standard entries so we can stub stuff in there.  Still, if the
ultimate goal is to have a standalone pypy interpreter, we're going to
to fork sooner or later.  Sooner will allow us to flush out some
unanticipated dependancies in the early stages.

Of course the downside of doing this is that someone will need to
CPython's lib directory and port patches across.  It might be a little
consuming, but for now the patches on python-commit should be able to be
applied easily.

More information about the Pypy-dev mailing list