From a7cb9bdfff48b2a6ae2bd1036a99d7c09451c46e Mon Sep 17 00:00:00 2001 From: Martin Rowan Date: Sat, 14 Jan 2017 05:03:50 +0000 Subject: [PATCH] Fixed bootstrap to upgrade pip if mininum version not present. As parameter --only-binary in requirements.txt doesn't work on pip < 7.0.0 so install fails. This is to simplify the setup of the development environment when using pyvenv. (#5301) --- script/bootstrap_server | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/script/bootstrap_server b/script/bootstrap_server index ccb7d1a8464..38684f9266c 100755 --- a/script/bootstrap_server +++ b/script/bootstrap_server @@ -7,11 +7,19 @@ set -e cd "$(dirname "$0")/.." echo "Installing dependencies..." +# Requirements_all.txt states minimum pip version as 7.0.0 however, +# parameter --only-binary doesn't work with pip < 7.0.0. Causing +# python3 -m pip install -r requirements_all.txt to fail unless pip upgraded. + +if ! python3 -c 'import pkg_resources ; pkg_resources.require(["pip>=7.0.0"])' 2>/dev/null ; then + echo "Upgrading pip..." + python3 -m pip install -U pip +fi python3 -m pip install -r requirements_all.txt REQ_STATUS=$? -echo "Installing development dependencies.." +echo "Installing development dependencies..." python3 -m pip install -r requirements_test.txt REQ_DEV_STATUS=$?