Skip to content
Snippets Groups Projects
Commit 7cbca2f5 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

always use pipenv if it's there


Signed-off-by: default avatarKenneth Reitz <me@kennethreitz.org>
parent fe302d87
No related branches found
No related tags found
No related merge requests found
...@@ -26,42 +26,39 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then ...@@ -26,42 +26,39 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then
# Pipenv support (Generate requriements.txt with pipenv). # Pipenv support (Generate requriements.txt with pipenv).
if [[ -f Pipfile ]]; then if [[ -f Pipfile ]]; then
if [[ ! -f requirements.txt ]]; then # Measure that we're using Pipenv.
mcount "tool.pipenv"
# Measure that we're using Pipenv. # Skip pip install, later.
mcount "tool.pipenv" export SKIP_PIP_INSTALL=1
# Skip pip install, later. # Set PIP_EXTRA_INDEX_URL
export SKIP_PIP_INSTALL=1 if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then
PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
# Set PIP_EXTRA_INDEX_URL export PIP_EXTRA_INDEX_URL
if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then fi
PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
export PIP_EXTRA_INDEX_URL
fi
# Install pipenv. # Install pipenv.
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null /app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
# Install the dependencies. # Install the dependencies.
if [[ ! -f Pipfile.lock ]]; then if [[ ! -f Pipfile.lock ]]; then
puts-step "Installing dependencies with latest Pipenv…" puts-step "Installing dependencies with latest Pipenv…"
/app/.heroku/python/bin/pipenv install --system --skip-lock 2>&1 | indent /app/.heroku/python/bin/pipenv install --system --skip-lock 2>&1 | indent
else else
pipenv-to-pip Pipfile.lock > requirements.txt pipenv-to-pip Pipfile.lock > requirements.txt
"$BIN_DIR/steps/pip-uninstall" "$BIN_DIR/steps/pip-uninstall"
cp requirements.txt .heroku/python/requirements-declared.txt cp requirements.txt .heroku/python/requirements-declared.txt
openssl dgst -sha256 Pipfile.lock > .heroku/python/Pipfile.lock.sha256 openssl dgst -sha256 Pipfile.lock > .heroku/python/Pipfile.lock.sha256
puts-step "Installing dependencies with latest Pipenv…" puts-step "Installing dependencies with latest Pipenv…"
/app/.heroku/python/bin/pipenv install --system --deploy 2>&1 | indent /app/.heroku/python/bin/pipenv install --system --deploy 2>&1 | indent
fi fi
# Install the test dependencies, for CI. # Install the test dependencies, for CI.
if [ "$INSTALL_TEST" ]; then if [ "$INSTALL_TEST" ]; then
puts-step "Installing test dependencies…" puts-step "Installing test dependencies…"
/app/.heroku/python/bin/pipenv install --dev --system --deploy 2>&1 | cleanup | indent /app/.heroku/python/bin/pipenv install --dev --system --deploy 2>&1 | cleanup | indent
fi
fi fi
fi fi
else else
......
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