[pypy-issue] [issue1117] Can't find library path from PATH
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
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 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 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.
title: Can't find library path from PATH
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue