From 9468ec263012daed0eb16e689ad7d7cf892a1e22 Mon Sep 17 00:00:00 2001
From: Eugene Pakhomov <p1himik@gmail.com>
Date: Sat, 17 Feb 2018 18:58:40 +0700
Subject: [PATCH] Add support for PIP_EXTRA_INDEX_URL (#639)

* Add support for PIP_EXTRA_INDEX_URL

* Add support for PIP_EXTRA_INDEX_URL for Pipenv
---
 bin/steps/pip-install | 6 ++++++
 bin/steps/pipenv      | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/bin/steps/pip-install b/bin/steps/pip-install
index be92bd14..4cae628b 100755
--- a/bin/steps/pip-install
+++ b/bin/steps/pip-install
@@ -8,6 +8,12 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
     # Install dependencies with Pip.
     puts-step "Installing requirements with pip"
 
+    # Set PIP_EXTRA_INDEX_URL
+    if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then
+        PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
+        export PIP_EXTRA_INDEX_URL
+    fi
+
     set +e
     
     # Measure that we're using pip.
diff --git a/bin/steps/pipenv b/bin/steps/pipenv
index 5e050f74..37af5620 100644
--- a/bin/steps/pipenv
+++ b/bin/steps/pipenv
@@ -13,6 +13,12 @@ if [[ -f Pipfile ]]; then
         # Measure that we're using Pipenv.
         mcount "tool.pipenv"
 
+        # Set PIP_EXTRA_INDEX_URL
+        if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then
+            PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
+            export PIP_EXTRA_INDEX_URL
+        fi
+
         # Install pipenv.
         /app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
 
-- 
GitLab