Skip to content

Commit 94d9c66

Browse files
committed
chore(pip): Remove zip-unsafe workaround for python 3.6
Originally from cb14c70, part of python-poetry#3835
1 parent 941ee5b commit 94d9c66

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

src/poetry/utils/pip.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import os
2-
import sys
3-
41
from typing import TYPE_CHECKING
52
from typing import Union
63

@@ -9,7 +6,6 @@
96

107
from poetry.exceptions import PoetryException
118
from poetry.utils.env import EnvCommandError
12-
from poetry.utils.env import ephemeral_environment
139

1410

1511
if 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

0 commit comments

Comments
 (0)