Skip to content

Commit

Permalink
feat: allow overriding where base pip packages get installed from whe…
Browse files Browse the repository at this point in the history
…n an index is specified
  • Loading branch information
josegonzalez committed Dec 12, 2018
1 parent e4307fc commit e74bbdb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/steps/python
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,16 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
rm -fr /app/.heroku/python/lib/python*/site-packages/pip-*
rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-*

/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
# This will allow users to override where pip gets installed from
# which is useful if CI for heroku applications is run in non-heroku environments
# where access to pypi is strictly controlled
if [[ -n "$GET_PIP_PYPI_INDEX_URL" ]]; then
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" --no-index "$GET_PIP_PYPI_INDEX_URL/pip/pip-9.0.2-py2.py3-none-any.whl" "$GET_PIP_PYPI_INDEX_URL/setuptools/setuptools-39.0.1-py2.py3-none-any.whl" "$GET_PIP_PYPI_INDEX_URL/wheel/wheel-0.31.1-py2.py3-none-any.whl" &> /dev/null
/app/.heroku/python/bin/pip install --no-index "$GET_PIP_PYPI_INDEX_URL/setuptools/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
else
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
fi

fi

Expand Down

0 comments on commit e74bbdb

Please sign in to comment.