File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import os
2- import sys
3-
41from typing import TYPE_CHECKING
52from typing import Union
63
96
107from poetry .exceptions import PoetryException
118from poetry .utils .env import EnvCommandError
12- from poetry .utils .env import ephemeral_environment
139
1410
1511if TYPE_CHECKING :
@@ -55,18 +51,6 @@ def pip_install(
5551 try :
5652 return environment .run_pip (* args )
5753 except EnvCommandError as e :
58- if sys .version_info < (3 , 7 ) and not is_wheel :
59- # Under certain Python3.6 installs vendored pip wheel does not contain
60- # zip-safe pep517 lib. In this cases we create an isolated ephemeral virtual
61- # environment.
62- with ephemeral_environment (
63- executable = environment .python , with_pip = True , with_setuptools = True
64- ) as env :
65- return environment .run (
66- * env .get_pip_command (),
67- * args ,
68- env = {** os .environ , "PYTHONPATH" : str (env .purelib )},
69- )
7054 raise PoetryException (f"Failed to install { path .as_posix ()} " ) from e
7155
7256
You can’t perform that action at this time.
0 commit comments