Skip to content
Snippets Groups Projects
Commit 91909008 authored by Ian Stapleton Cordasco's avatar Ian Stapleton Cordasco
Browse files

Allow users to override the version of pipenv used

This also starts tracking which Pipenv version users are selecting to
use.

Closes #702
Closes #704
Closes #706
Closes #727
parent 4d5a5321
No related branches found
No related tags found
No related merge requests found
# Python Buildpack Changelog
# Unreleased
- Fix bug with the "latest version" message on 3.7.0
- Add an `OVERRIDDEN_PIPENV_VERSION` option to override the version of Pipenv
used in the buildpack
- Upgrade the `DEFAULT_PIPENV_VERSION` to `2018.7.1`
# 136
Upgrade to 3.6.6 and support 3.7.0 on all runtimes.
......
......@@ -6,21 +6,19 @@
source "$BIN_DIR/utils"
set -e
export DEFAULT_PIPENV_VERSION="2018.7.1"
if [[ -f Pipfile.lock ]]; then
if [[ -f .heroku/python/Pipfile.lock.sha256 ]]; then
if [[ $(openssl dgst -sha256 Pipfile.lock) == $(cat .heroku/python/Pipfile.lock.sha256) ]]; then
# Measure that we're using Pipenv.
mcount "tool.pipenv"
# Don't skip installation of there are git deps.
if ! grep -q 'git' Pipfile.lock; then
echo "Skipping installation, as Pipfile.lock hasn't changed since last deploy." | indent
mcount "tool.pipenv"
export SKIP_PIPENV_INSTALL=1
export SKIP_PIP_INSTALL=1
fi
mcount "tool.pipenv"
fi
fi
fi
......@@ -29,9 +27,6 @@ fi
if [ ! "$SKIP_PIPENV_INSTALL" ]; then
# Pipenv support (Generate requriements.txt with pipenv).
if [[ -f Pipfile ]]; then
# Measure that we're using Pipenv.
mcount "tool.pipenv"
# Skip pip install, later.
export SKIP_PIP_INSTALL=1
......@@ -41,10 +36,12 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then
export PIP_EXTRA_INDEX_URL
fi
export PIPENV_VERSION="2018.7.1"
export PIPENV_VERSION="${OVERRIDDEN_PIPENV_VERSION:-$DEFAULT_PIPENV_VERSION}"
mcount "tool.pipenv"
mcount "version.pipenv.$PIPENV_VERSION"
# Install pipenv.
/app/.heroku/python/bin/pip install pipenv==$PIPENV_VERSION --upgrade &> /dev/null
/app/.heroku/python/bin/pip install "pipenv==$PIPENV_VERSION" --upgrade &> /dev/null
# Install the dependencies.
if [[ ! -f Pipfile.lock ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment