Merge "Add a get_pip_command function"

This commit is contained in:
Jenkins 2012-12-03 17:05:04 +00:00 committed by Gerrit Code Review
commit 22d6799d73
2 changed files with 15 additions and 10 deletions

View File

@ -645,11 +645,7 @@ function pip_install {
SUDO_PIP="env" SUDO_PIP="env"
else else
SUDO_PIP="sudo" SUDO_PIP="sudo"
if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then CMD_PIP=$(get_pip_command)
CMD_PIP=/usr/bin/pip
else
CMD_PIP=/usr/bin/pip-python
fi
fi fi
if [[ "$PIP_USE_MIRRORS" != "False" ]]; then if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
PIP_MIRROR_OPT="--use-mirrors" PIP_MIRROR_OPT="--use-mirrors"
@ -1046,6 +1042,19 @@ function get_rootwrap_location() {
fi fi
} }
# Get the path to the pip command.
# get_pip_command
function get_pip_command() {
if [[ -z "$os_PACKAGE" ]]; then
GetOSVersion
fi
if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then
echo "/usr/bin/pip"
else
echo "/usr/bin/pip-python"
fi
}
# Check if qpid can be used on the current distro. # Check if qpid can be used on the current distro.
# qpid_is_supported # qpid_is_supported

View File

@ -107,11 +107,7 @@ done
# Pips # Pips
# ---- # ----
if [[ "$os_PACKAGE" = "deb" ]]; then CMD_PIP=$(get_pip_command)
CMD_PIP=/usr/bin/pip
else
CMD_PIP=/usr/bin/pip-python
fi
# Pip tells us what is currently installed # Pip tells us what is currently installed
FREEZE_FILE=$(mktemp --tmpdir freeze.XXXXXX) FREEZE_FILE=$(mktemp --tmpdir freeze.XXXXXX)