Skip to content
Unverified Commit 80581105 authored by Sébastien Eustace's avatar Sébastien Eustace Committed by GitHub
Browse files

use run_pip of env in executor (#2701) (#2714)

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: default avatarJonathan Striebel <jstriebel@users.noreply.github.com>
parent 2ba36c82
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment