[pypy-dev] Fork lib?

logistix logistix at zworg.com
Sun Mar 2 23:09:56 CET 2003

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 the
interpreter's pythonpath point there.

I'm trying to get the pure-python bytecode compiler package in order.  The
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 before
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 it,
but a pure python DFA would be nice while dependancies are being worked out
(although slow as hell).  I could just drop that in the lib directory, but
then we're running against a patched version of CPython.

The only other alternative is to insert something into pythonpath before any
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 need
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 monitor
CPython's lib directory and port patches across.  It might be a little time
consuming, but for now the patches on python-commit should be able to be
applied easily.

More information about the Pypy-dev mailing list