From 46fd9f086514cfacc12b81a345b69c7d825fc86e Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Mon, 8 Nov 2021 15:26:00 +0100 Subject: [PATCH] Use the default installer (pip) even it fails in an offline env --- src/tox_current_env/hooks4.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tox_current_env/hooks4.py b/src/tox_current_env/hooks4.py index 543432d..2618652 100644 --- a/src/tox_current_env/hooks4.py +++ b/src/tox_current_env/hooks4.py @@ -11,6 +11,7 @@ from tox.execute.local_sub_process import LocalSubProcessExecuteInstance from tox.plugin import impl from tox.report import HandledError from tox.tox_env.python.api import PythonInfo +from tox.tox_env.python.pip.pip_install import Pip from tox.tox_env.python.runner import PythonRun @@ -137,7 +138,7 @@ class CurrentEnv(PythonRun): @property def installer(self): if self._installer is None: - self._installer = DummyInstaller() + self._installer = Pip(self) return self._installer def prepend_env_var_path(self): @@ -162,11 +163,6 @@ class CurrentEnvRunExecutor(Execute): return LocalSubProcessExecuteInstance(request, options, out, err) -class DummyInstaller: - def install(self, *args): - return - - class PrintEnv(CurrentEnv): def __init__(self, create_args): super().__init__(create_args)