From bd99aa360bcebf9bf2a297939b67922c09062d96 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 11 Sep 2017 10:55:46 -0400 Subject: [PATCH] PIPENV_PIP_INSTALL_FLAGS Signed-off-by: Kenneth Reitz --- pipenv/cli.py | 7 ++++--- pipenv/environments.py | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index abfa6900..92dbcd5a 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -33,7 +33,7 @@ from . import pep508checker, progress from .environments import ( PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT, PIPENV_VENV_IN_PROJECT, PIPENV_USE_SYSTEM, PIPENV_TIMEOUT, - PIPENV_SKIP_VALIDATION + PIPENV_SKIP_VALIDATION, PIPENV_PIP_INSTALL_FLAGS ) # Backport required for earlier versions of Python. @@ -791,11 +791,12 @@ def pip_install( no_deps = '--no-deps' if no_deps else '' - pip_command = '"{0}" install {3} {1} -i {2} --exists-action w'.format( + pip_command = '"{0}" install {3} {1} -i {2} --exists-action w {4}'.format( which_pip(allow_global=allow_global), install_reqs, source['url'], - no_deps + no_deps, + PIPENV_PIP_INSTALL_FLAGS or '' ) if verbose: diff --git a/pipenv/environments.py b/pipenv/environments.py index bf0baddc..eb1b19ac 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -39,5 +39,8 @@ if PIPENV_VENV_IN_PROJECT: if os.name == 'nt': PIPENV_NOSPIN = True +# Tells pip to pass extra stuff to $ pip install. +PIPENV_PIP_INSTALL_FLAGS = os.environ.get('PIPENV_PIP_INSTALL_FLAGS') + # Tells pipenv how long to wait for virtualenvs to be created in seconds PIPENV_TIMEOUT = int(os.environ.get('PIPENV_TIMEOUT', 120))