executor.py
22.3 KB
-
use run_pip of env in executor (#2701) (#2714) · 80581105
This ensures to use the correct python executable. Using `run` simply uses `sys.prefix` with a bin suffix, which is not necessarily the currently used python executable. E.g. when linking a specific python version to a custom directory, using `sys.prefix` may point to the wrong python version: * /usr/bin/python2.7 * /usr/bin/python3.6 * /usr/bin/python is a symlink to 2.7 * /usr/bin/local/python (or any other location) is a symlink to 3.6 which shadows the former symlink `sys.prefix` is `/usr` in this case, which is correct, but the `python` executable there points to the wrong version. `run_pip` in the env fixes this already by using `sys.executable`, see https://github.com/python-poetry/poetry/blob/develop/poetry/utils/env.py#L964 This should be used in the executor as well. Co-authored-by: Jonathan Striebel <jstriebel@users.noreply.github.com>
Sébastien Eustace committed