diff --git a/pipenv/patched/pip/req/req_install.py b/pipenv/patched/pip/req/req_install.py index 783ef963..fdfdd191 100644 --- a/pipenv/patched/pip/req/req_install.py +++ b/pipenv/patched/pip/req/req_install.py @@ -54,6 +54,9 @@ logger = logging.getLogger(__name__) operators = specifiers.Specifier._operators.keys() +PIP_PYTHON_PATH = os.environ.get('PIP_PYTHON_PATH') + + def _strip_extras(path): m = re.match(r'^(.+)(\[[^\]]+\])$', path) extras = None @@ -417,9 +420,6 @@ class InstallRequirement(object): self.setup_py, self.link, ) - # Support - PIP_PYTHON_PATH = os.environ.get('PIP_PYTHON_PATH') - with indent_log(): script = SETUPTOOLS_SHIM % self.setup_py base_cmd = [PIP_PYTHON_PATH or sys.executable, '-c', script] @@ -944,7 +944,7 @@ class InstallRequirement(object): return self.source_dir def get_install_args(self, global_options, record_filename, root, prefix): - install_args = [sys.executable, "-u"] + install_args = [PIP_PYTHON_PATH or sys.executable, "-u"] install_args.append('-c') install_args.append(SETUPTOOLS_SHIM % self.setup_py) install_args += list(global_options) + \ @@ -998,7 +998,7 @@ class InstallRequirement(object): # FIXME: should we do --install-headers here too? call_subprocess( [ - sys.executable, + PIP_PYTHON_PATH or sys.executable, '-c', SETUPTOOLS_SHIM % self.setup_py ] +