Calling create_symlinks after ensurepip is unnecessary

Install script of setuptools-6.1/pip-1.5.6 will create those links if needed
This commit is contained in:
Yamashita Yuu
2014-10-19 10:59:52 +09:00
parent 1d36ef2f68
commit a02eb0a396
4 changed files with 2 additions and 36 deletions

View File

@@ -185,28 +185,6 @@ build_package_ensurepip() {
pyenv-exec python -m ensurepip 2>/dev/null|| {
build_package_ez_setup "$@" && build_package_get_pip "$@"
} || return 1
create_symlinks "$(pyenv-exec python -c 'import sys;v=sys.version_info;sys.stdout.write("python%d.%d"%(v[0],v[1]))')"
}
create_symlinks() {
local suffix="$1"
local file link
shopt -s nullglob
for file in "${VIRTUALENV_PATH}/bin"/*; do
if [[ "${file##*/}" == *"${suffix}" ]]; then
if [[ "${file}" == *"-${suffix}" ]]; then
link="${file%%-${suffix}}"
else
link="${file%%${suffix}}"
fi
if [ ! -e "${link}" ]; then
( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" )
fi
fi
done
shopt -u nullglob
}
prepare_requirements() {