> On Fri, Jun 28, 2013 at 10:41 PM, Skip Montanaro
> <[email protected]> wrote:
>> Now, try the same experiment with PyPy.  The relative order of those
>> two directories is reversed:
>
> Sorry, I can't reproduce the problem you describe.  More importantly I
> don't understand why '/opt/local/lib/python2.7/site-packages' ends up
> in sys.path at all on top of pypy.  There is no reason to: pypy has no
> notion of '.../lib/python2.7', and certainly ending up with the same
> path as CPython looks very wrong to me (like it would be wrong to have
> CPython 2.6 and 2.7 both use
> '/opt/local/lib/python2.7/site-packages').
>
> It's a custom-compiled pypy, so did you install it using the official
> script pypy/tool/release/package.py?  If not, please give the paths
> where you copied things, starting with the pypy executable.  Note that
> pypy is *not* supposed to be installed exactly like CPython.

Armin,

Thanks for the response.  We have a lot of open source software
packaged and provided for us by a company called The Written Word.
That includes Python 2.7.  Everything is installed with /opt/local as
a replacement for /usr/local.  For example:

% PYTHONPATH= python -S -E
Python 2.7.2 (default, Nov 14 2012, 05:07:35)
[GCC 4.4.6 [TWW]] on linux3
>>> import sys
>>> sys.path
['', '/opt/TWWfsw/curl722/lib/python27',
'/opt/TWWfsw/cython017/lib/python27',
'/opt/TWWfsw/distribute06/lib/python27',
'/opt/TWWfsw/docutils08/lib/python27',
'/opt/TWWfsw/git18/lib/python27',
'/opt/TWWfsw/gnuplot44/lib/python27',
'/opt/TWWfsw/jinja26/lib/python27',
'/opt/TWWfsw/libcairo110/lib/python27',
'/opt/TWWfsw/libgd20/lib/python27',
'/opt/TWWfsw/libglib226/lib/python27',
'/opt/TWWfsw/libgnutls210/lib/python27',
'/opt/TWWfsw/libgtk+222/lib/python27',
'/opt/TWWfsw/libgtk+222/lib/python27/gtk-2.0',
'/opt/TWWfsw/libqt47/lib/python27',
'/opt/TWWfsw/libxml27/lib/python27',
'/opt/TWWfsw/libyaml01/lib/python27',
'/opt/TWWfsw/libzeromq22/lib/python27',
'/opt/TWWfsw/lxml22/lib/python27',
'/opt/TWWfsw/matplotlib12/lib/python27',
'/opt/TWWfsw/mysql5515r/lib/python27',
'/opt/TWWfsw/nose11/lib/python27', '/opt/TWWfsw/numpy16/lib/python27',
'/opt/TWWfsw/openldap24/lib/python27',
'/opt/TWWfsw/pycrypto23/lib/python27',
'/opt/TWWfsw/pygments14/lib/python27',
'/opt/TWWfsw/scipy09/lib/python27',
'/opt/TWWfsw/sphinx10/lib/python27',
'/opt/TWWfsw/subversion17/lib/python27',
'/opt/local/lib/python2.7/site-packages',
'/opt/local/lib/python2.7/site-packages',
'/opt/local/lib/python2.7/site-packages',
'/opt/local/lib/python2.7/site-packages/snakemodels',
'/opt/local/lib/python2.7/site-packages',
'/opt/TWWfsw/python27/lib/python27.zip',
'/opt/TWWfsw/python27/lib/python2.7/',
'/opt/TWWfsw/python27/lib/python2.7/plat-linux3',
'/opt/TWWfsw/python27/lib/python2.7/lib-tk',
'/opt/TWWfsw/python27/lib/python2.7/lib-old',
'/opt/TWWfsw/python27/lib/python2.7/lib-dynload']

Kind of weird that /opt/local/lib/python2.7/site-packages shows up four times.

When I ran

  python ../../rpython/bin/rpython -Ojit targetpypystandalone

that version of Python was executed.  Accordingly,
/opt/local/lib/python2.7/site-packages was in sys.path, as it should
have been.  It appears that the generated pypy-c wound up with that
directory in its sys.path as well.  I wasn't executing it from an
installed location.  I just set up an alias to execute it from the
goal directory. OTOH, perhaps I should build it using /usr/bin/python:

% PYTHONPATH= /usr/bin/python -S -E
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
>>> import sys
>>> sys.path
['', '/usr/lib/python27.zip', '/usr/lib64/python2.7/',
'/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload']

(though I don't understand why /usr/lib/python2.7/site-packages isn't
in sys.path here.  Maybe site.py does that?)

Skip
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to