[pypy-issue] [issue1117] Can't find library path from PATH

Gabriel tracker at bugs.pypy.org
Sun Apr 8 19:14:49 CEST 2012


New submission from Gabriel <g2p.code+pypy at gmail.com>:

This issue prevents pypy from starting in some cases.

sys.executable is set to an empty string when the interpreter can't find argv[0]
in the PATH environment variable. This is a bit too strict when the
interpreter's command search logic doesn't match the shell's (my shell resolves
~/bin when searching PATH, Python doesn't), or when argv[0] has some unrelated
value, but the strict behaviour matches CPython (after CPython issue 7774 was
closed). There are more reliable ways of getting the current executable, but
it's a bit ambiguous if argv[0] should be preferred to /proc/self/exe, so doing
like CPython and leaving it empty is an acceptable choice.

When looking up the library search path, I'd prefer if PyPy used the more
reliable /proc/self/exe method though; the alternative is that PyPy fails to
start. Here is a patch that adds that method as a fallback in get_library_path.

----------
messages: 4202
nosy: pypy-issue
priority: critical
status: unread
title: Can't find library path from PATH

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1117>
________________________________________


More information about the pypy-issue mailing list