From 9625a9f93b9b62224d6b99df409b1f415f1cbef9 Mon Sep 17 00:00:00 2001 From: Casey Faist <caseylfaist@gmail.com> Date: Mon, 8 Oct 2018 16:42:12 -0500 Subject: [PATCH] check for user specified pipenv version --- CHANGELOG.md | 6 ++++++ bin/steps/pipenv | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 108a0eab..7a2be036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Python Buildpack Changelog +#141 (2018-10-10) + +Pin pipenv to version 2018.7.1 +Use same pip version is used for pip and pipenv installs +Allow pipenv version override + # 140 (2018-10-09) Add support for detecting SLUGIFY_USES_TEXT_UNIDECODE, which is required to diff --git a/bin/steps/pipenv b/bin/steps/pipenv index 5e88c771..b1121711 100755 --- a/bin/steps/pipenv +++ b/bin/steps/pipenv @@ -41,6 +41,15 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then mcount "buildvar.PIP_EXTRA_INDEX_URL" fi + # PIP_EXTRA_INDEX_URL allows for an alternate pypi URL to be used. + if [[ -r $ENV_DIR/DEFAULT_PIPENV_VERSION ]]; then + DEFAULT_PIPENV_VERSION="$(cat "$ENV_DIR/DEFAULT_PIPENV_VERSION")" + export DEFAULT_PIPENV_VERSION + mcount "buildvar.DEFAULT_PIPENV_VERSION" + else + export DEFAULT_PIPENV_VERSION="2018.7.1" + fi + # Set SLUGIFY_USES_TEXT_UNIDECODE, required for Airflow versions >=1.10 if [[ -r $ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE ]]; then SLUGIFY_USES_TEXT_UNIDECODE="$(cat "$ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE")" @@ -48,7 +57,7 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then mcount "buildvar.SLUGIFY_USES_TEXT_UNIDECODE" fi - export DEFAULT_PIPENV_VERSION="2018.7.1" + # Install pipenv; do not upgrade. /app/.heroku/python/bin/pip install pipenv==$PIPENV_VERSION &> /dev/null -- GitLab