Hi Maciek, On 29/05/10 19:32, Maciej Fijalkowski wrote: > Hm. > > I might be missing something, but I thought sys.prefix is only meant > for stuff after installation. If this is true (my CPython trunk build > has sys.prefix == '/usr/local'), then modifying source checkout does > not make any sense, since it's only about installation (which we don't > really support anyway).
you are partly right. In CPython, sys.prefix is just an hard-coded string that represent what was passed to ./configure; tools like virtualenv use it to find the directories containing the stdlib, include files, etc. on the filesystem (I'm not sure it's an entirely good idea, but this is the state of the things and we have to face it). However, nothing prevents the interpreter to set sys.prefix dynamically, e.g. by searching for the directory that contains the stdlib in some location relative to the pypy-c binary; this is what pypy-c does it already to set sys.path. The point of this branch is both: 1) to make it easier to install pypy system-wide: it will be enough to copy pypy-c in /usr/bin and lib/pypy1.2 in /usr/lib (and of course we can automate this with a script, if we want) 2) as holger pointed out, to make it possible to use virtualenv *without* having to install pypy system-wide (which you cannot do with cpython, for example): this will be possible because the directory hierarchy of the svn checkout is designed in a way that setting sys.prefix to the the root of the svn checkout will "just work" ciao, Anto _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
