Skip to content

Commit 7a95280

Browse files
committed
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.
1 parent 6c27ac9 commit 7a95280

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

distribute.sh

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ if [ "X$PYTHON" == "X" ]; then
1818
PYTHON="$(which python)"
1919
fi
2020

21-
# Resolve pip path
22-
PIP_NAME="$(which pip-2.7)"
23-
if [ "X$PIP_NAME" == "X" ]; then
24-
PIP_NAME="$(which pip2.7)"
25-
fi
26-
if [ "X$PIP_NAME" == "X" ]; then
27-
PIP_NAME="$(which pip2)"
28-
fi
29-
if [ "X$PIP_NAME" == "X" ]; then
30-
PIP_NAME="$(which pip)"
31-
fi
32-
3321
# Resolve virtualenv path
3422
VIRTUALENV_NAME="$(which virtualenv-2.7)"
3523
if [ "X$VIRTUALENV_NAME" == "X" ]; then
@@ -66,7 +54,6 @@ CYTHON+=" -t"
6654
export LIBLINK_PATH="$BUILD_PATH/objects"
6755
export LIBLINK="$ROOT_PATH/src/tools/liblink"
6856
export BIGLINK="$ROOT_PATH/src/tools/biglink"
69-
export PIP=${PIP_NAME:-pip}
7057
export VIRTUALENV=${VIRTUALENV_NAME:-virtualenv}
7158

7259
export COPYLIBS=0
@@ -736,16 +723,14 @@ function run_pymodules_install() {
736723

737724
debug "We want to install: $PYMODULES"
738725

739-
debug "Check if $VIRTUALENV and $PIP are present"
740-
for tool in "$VIRTUALENV" "$PIP"; do
741-
which $tool &>/dev/null
742-
if [ $? -ne 0 ]; then
743-
error "Tool $tool is missing"
744-
exit -1
745-
fi
746-
done
726+
debug "Check if $VIRTUALENV is present"
727+
which $VIRTUALENV &>/dev/null
728+
if [ $? -ne 0 ]; then
729+
error "Tool $VIRTUALENV is missing"
730+
exit -1
731+
fi
747732

748-
debug "Check if virtualenv is existing"
733+
debug "Check if a virtual environment already exists"
749734
if [ ! -d venv ]; then
750735
debug "Installing virtualenv"
751736
try $VIRTUALENV --python=python2.7 venv

0 commit comments

Comments
 (0)