Make sure python-dev is installed wheb trying to install tornado from PyPi

Fixes #640
This commit is contained in:
Pedro Algarvio 2015-08-06 14:32:39 +01:00
parent 9f2b8b75dd
commit 2e30cec780

View file

@ -1840,13 +1840,17 @@ install_ubuntu_stable_deps() {
add-apt-repository "ppa:$STABLE_PPA" || return 1
fi
__PACKAGES=""
if [ ! "$(echo "$STABLE_REV" | egrep '^(2015\.8|latest)$')" = "" ]; then
# We need a recent tornado package
__REQUIRED_TORNADO="tornado >= 4.0"
check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'"
if [ "$(which pip)" = "" ]; then
__apt_get_install_noinput python-setuptools python-pip
__PACKAGES="${__PACKAGES} python-setuptools python-pip"
fi
__PACKAGES="${__PACKAGES} python-dev"
# shellcheck disable=SC2086
__apt_get_install_noinput $__PACKAGES
pip install -U "${__REQUIRED_TORNADO}"
fi
@ -1888,14 +1892,18 @@ install_ubuntu_git_deps() {
__git_clone_and_checkout || return 1
__PACKAGES=""
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
# We're on the develop branch, install whichever tornado is on the requirements file
__REQUIRED_TORNADO="$(grep tornado "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
if [ "${__REQUIRED_TORNADO}" != "" ]; then
__PACKAGES="${__PACKAGES} python-dev"
check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'"
if [ "$(which pip)" = "" ]; then
__apt_get_install_noinput python-setuptools python-pip
__PACKAGES="${__PACKAGES} python-setuptools python-pip"
fi
# shellcheck disable=SC2086
__apt_get_install_noinput $__PACKAGES
pip install -U "${__REQUIRED_TORNADO}"
fi
fi
@ -2390,6 +2398,7 @@ install_debian_git_deps() {
__REQUIRED_TORNADO="$(grep tornado "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
if [ "${__REQUIRED_TORNADO}" != "" ]; then
check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'"
__apt_get_install_noinput python-dev
pip install -U "${__REQUIRED_TORNADO}" || return 1
fi
fi