[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile
Ronald Oussoren
report at bugs.python.org
Sun Sep 23 10:53:28 EDT 2018
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
I've added PR 9516 that just clears __PYVENV_LAUNCHER__ from the environment as soon as it is no longer needed.
A more involved change would be to change both the interpreter and the stub executable to avoid the need to use an environment variable in the first place:
- Add and "-X" flag to the interpreter to pass the information that's currently passed using an environment variable
- Change pythonw.c to add this new option to the argv vector.
This would be slightly cleaner, at the cost of having more complicated code (and is a change that would IMHO not qualify for a back port, while my current PR is minimal enough for a back port)
Note that both with and without this PR sys.executable points to the python executable inside the venv (when using a env).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22490>
_______________________________________
More information about the Python-bugs-list
mailing list