Message414373
> I've pasted the diff below because I'm not yet convinced that it is correct (in particular the value for "argv0".)
argv0 is literally what C sees in argv[0], which in the framework case I
believe is calculated by a launcher?
The getpath.py change is probably adding an OS check for this line:
https://github.com/python/cpython/blob/main/Modules/getpath.py#L304
if ENV_PYTHONEXECUTABLE or ENV___PYVENV_LAUNCHER__:
# If set, these variables imply that we should be using them as
# sys.executable and when searching for venvs. However, we should
# use the argv0 path for prefix calculation
if os_name != 'darwin':
base_executable = executable
if not real_executable:
real_executable = executable
executable = ENV_PYTHONEXECUTABLE or ENV___PYVENV_LAUNCHER__
executable_dir = dirname(executable)
I think the comment "we should use the argv0 path for prefix
calculation" isn't correct (anymore?) either, since updating
executable_dir is going to do the opposite of that. But I guess there
were tests proving otherwise. It won't affect this case, since both
argv0 and ENV___PYVENV_LAUNCHER__ appear to be under the same prefix (at
least in Ronald's example). |
|
Date |
User |
Action |
Args |
2022-03-02 16:28:49 | steve.dower | set | recipients:
+ steve.dower, vinay.sajip, ronaldoussoren, ned.deily, eric.snow, pablogsal |
2022-03-02 16:28:49 | steve.dower | link | issue46890 messages |
2022-03-02 16:28:49 | steve.dower | create | |
|