From 365cd6e2cf358d74ffe52b9011b4ef7b0a76b359 Mon Sep 17 00:00:00 2001 From: miraculixx Date: Thu, 25 Aug 2016 17:19:36 +0200 Subject: [PATCH 1/2] allow-external on local installs this makes --process-dependency-links work --- bin/steps/pip-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 085fd47a6..7425596bc 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -34,13 +34,13 @@ if [ -f requirements.local.$APP ]; then puts-step "Uninstalling pre-installed shrebo libraries from requirements.local.$APP" /app/.heroku/python/bin/pip uninstall -y -r requirements.local.$APP --disable-pip-version-check puts-step "Installing shrebo packages for $APP from requirements.local.$APP" - /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local.$APP --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent + /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local.$APP --allow-external --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent PIP_STATUS="${PIPESTATUS[0]}" elif [ -f requirements.local ]; then puts-step "Uninstalling pre-installed shrebo libraries from requirements.local" /app/.heroku/python/bin/pip uninstall -y -r requirements.local --disable-pip-version-check puts-step "Installing shrebo packages for $APP from requirements.local" - /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent + /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local --allow-external --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent PIP_STATUS="${PIPESTATUS[0]}" fi From 37720fcaa85f9d8dcb42c96e1a08d6f0c6a2c0ea Mon Sep 17 00:00:00 2001 From: miraculixx Date: Fri, 26 Aug 2016 22:21:07 +0200 Subject: [PATCH 2/2] install requirements.local last, deduplicate code --- bin/steps/pip-install | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 7425596bc..61b648871 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -29,24 +29,25 @@ else sed -i "s/\$APP/$PYPIAPP/" requirements* fi -if [ -f requirements.local.$APP ]; then +puts-step "Installing standard packages for $APP" +/app/.heroku/python/bin/pip install --process-dependency-links -r requirements.txt --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent +PIP_STATUS="${PIPESTATUS[0]}" + +# install $APP-local requirements. +function install_local() { # uninstall packages before installing them - puts-step "Uninstalling pre-installed shrebo libraries from requirements.local.$APP" - /app/.heroku/python/bin/pip uninstall -y -r requirements.local.$APP --disable-pip-version-check - puts-step "Installing shrebo packages for $APP from requirements.local.$APP" - /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local.$APP --allow-external --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent + puts-step "Uninstalling pre-installed shrebo libraries from $1" + /app/.heroku/python/bin/pip uninstall -y -r $1 --disable-pip-version-check + puts-step "Installing shrebo packages for $APP from $" + /app/.heroku/python/bin/pip install --process-dependency-links -r $1 --allow-external --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent PIP_STATUS="${PIPESTATUS[0]}" +} + +if [ -f requirements.local.$APP ]; then + install_local requirements.local.$APP elif [ -f requirements.local ]; then - puts-step "Uninstalling pre-installed shrebo libraries from requirements.local" - /app/.heroku/python/bin/pip uninstall -y -r requirements.local --disable-pip-version-check - puts-step "Installing shrebo packages for $APP from requirements.local" - /app/.heroku/python/bin/pip install --process-dependency-links -r requirements.local --allow-external --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent - PIP_STATUS="${PIPESTATUS[0]}" + install_local requirements.local fi - -puts-step "Installing standard packages for $APP" -/app/.heroku/python/bin/pip install --process-dependency-links -r requirements.txt --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent -PIP_STATUS="${PIPESTATUS[0]}" set -e show-warnings