From 7a952804a4c2e206a46707eb1cf41a85317cc828 Mon Sep 17 00:00:00 2001 From: Marco Mariani Date: Fri, 2 Jan 2015 14:12:29 +0100 Subject: [PATCH] Don't search for the pip command When pip is needed, it's provided by the mandatory virtual environment. Therefore, there is no need to require an external one. --- distribute.sh | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/distribute.sh b/distribute.sh index 95913b3743..cac904ff39 100755 --- a/distribute.sh +++ b/distribute.sh @@ -18,18 +18,6 @@ if [ "X$PYTHON" == "X" ]; then PYTHON="$(which python)" fi -# Resolve pip path -PIP_NAME="$(which pip-2.7)" -if [ "X$PIP_NAME" == "X" ]; then - PIP_NAME="$(which pip2.7)" -fi -if [ "X$PIP_NAME" == "X" ]; then - PIP_NAME="$(which pip2)" -fi -if [ "X$PIP_NAME" == "X" ]; then - PIP_NAME="$(which pip)" -fi - # Resolve virtualenv path VIRTUALENV_NAME="$(which virtualenv-2.7)" if [ "X$VIRTUALENV_NAME" == "X" ]; then @@ -66,7 +54,6 @@ CYTHON+=" -t" export LIBLINK_PATH="$BUILD_PATH/objects" export LIBLINK="$ROOT_PATH/src/tools/liblink" export BIGLINK="$ROOT_PATH/src/tools/biglink" -export PIP=${PIP_NAME:-pip} export VIRTUALENV=${VIRTUALENV_NAME:-virtualenv} export COPYLIBS=0 @@ -736,16 +723,14 @@ function run_pymodules_install() { debug "We want to install: $PYMODULES" - debug "Check if $VIRTUALENV and $PIP are present" - for tool in "$VIRTUALENV" "$PIP"; do - which $tool &>/dev/null - if [ $? -ne 0 ]; then - error "Tool $tool is missing" - exit -1 - fi - done + debug "Check if $VIRTUALENV is present" + which $VIRTUALENV &>/dev/null + if [ $? -ne 0 ]; then + error "Tool $VIRTUALENV is missing" + exit -1 + fi - debug "Check if virtualenv is existing" + debug "Check if a virtual environment already exists" if [ ! -d venv ]; then debug "Installing virtualenv" try $VIRTUALENV --python=python2.7 venv