Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2731,23 +2731,21 @@ __install_salt_from_repo() {
echodebug "__install_salt_from_repo py_exe=$_py_exe"

_py_version=$(${_py_exe} -c "import sys; print('{0}.{1}'.format(*sys.version_info))")
_pip_cmd="pip${_py_version}"
if ! __check_command_exists "${_pip_cmd}"; then
echodebug "The pip binary '${_pip_cmd}' was not found in PATH"
_pip_cmd="pip$(echo "${_py_version}" | cut -c -1)"
_pip_cmd="${_py_exe} -m pip"
_pip_version="$(${_pip_cmd} --version)"
if [ -z "${_pip_version}" ]; then
echodebug "Pip is not installed for Python '${_py_exe}' (version ${_py_version})"
_pip_cmd="pip${_py_version}"
if ! __check_command_exists "${_pip_cmd}"; then
echodebug "The pip binary '${_pip_cmd}' was not found in PATH"
_pip_cmd="pip"
if ! __check_command_exists "${_pip_cmd}"; then
echoerror "Unable to find a pip binary"
return 1
fi
echoerror "Unable to find a pip binary"
return 1
fi
fi

__check_pip_allowed

echodebug "Installed pip version: $(${_pip_cmd} --version)"
echodebug "Installed pip version: $_pip_version"

_setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<${_MAXIMUM_SETUPTOOLS_VERSION}"
if [ "$_PY_MAJOR_VERSION" -ne 3 ]; then
Expand Down