Merge "Drop workaround for pip < 1.4"
This commit is contained in:
commit
39ceb484a4
11
functions
11
functions
@ -21,17 +21,6 @@ function function_exists {
|
|||||||
declare -f -F $1 > /dev/null
|
declare -f -F $1 > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Cleanup anything from /tmp on unstack
|
|
||||||
# clean_tmp
|
|
||||||
function cleanup_tmp {
|
|
||||||
local tmp_dir=${TMPDIR:-/tmp}
|
|
||||||
|
|
||||||
# see comments in pip_install
|
|
||||||
sudo rm -rf ${tmp_dir}/pip-build.*
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Retrieve an image from a URL and upload into Glance.
|
# Retrieve an image from a URL and upload into Glance.
|
||||||
# Uses the following variables:
|
# Uses the following variables:
|
||||||
#
|
#
|
||||||
|
@ -1526,15 +1526,6 @@ function pip_install {
|
|||||||
pip_mirror_opt="--use-mirrors"
|
pip_mirror_opt="--use-mirrors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pip < 1.4 has a bug where it will use an already existing build
|
|
||||||
# directory unconditionally. Say an earlier component installs
|
|
||||||
# foo v1.1; pip will have built foo's source in
|
|
||||||
# /tmp/$USER-pip-build. Even if a later component specifies foo <
|
|
||||||
# 1.1, the existing extracted build will be used and cause
|
|
||||||
# confusing errors. By creating unique build directories we avoid
|
|
||||||
# this problem. See https://github.com/pypa/pip/issues/709
|
|
||||||
local pip_build_tmp=$(mktemp --tmpdir -d pip-build.XXXXX)
|
|
||||||
|
|
||||||
$xtrace
|
$xtrace
|
||||||
$sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
$sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
||||||
http_proxy=$http_proxy \
|
http_proxy=$http_proxy \
|
||||||
|
@ -173,5 +173,3 @@ if [[ -n "$SCREEN" ]]; then
|
|||||||
screen -X -S $SESSION quit
|
screen -X -S $SESSION quit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cleanup_tmp
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user