mirror of
				https://github.com/fedora-python/tox-current-env.git
				synced 2025-11-04 01:58:56 +01:00 
			
		
		
		
	Use the default installer (pip) even it fails in an offline env
This commit is contained in:
		
				
					committed by
					
						
						Miro Hrončok
					
				
			
			
				
	
			
			
			
						parent
						
							5d3802da93
						
					
				
				
					commit
					46fd9f0865
				
			@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user