Upgrade setuptools to 1.10 or more in a newly created virtualenv

By default, virtualenv embeds setuptools, and doesn't download its
latest version. At the moment, latest virtualenv is 1.10.1, which does
install setuptools-0.9.8

Unfortunately, setuptools-0.9.8 doesn't manage correctly HTTPS
certificates if the user is specifying a proxy with https_proxy and
http_proxy environments variables. This can raise an error if the
server to download is having TLS2_3 HTTPS certificate, by example when
pip installing python-novaclient, whick asks for
https://pypi.python.org/simple/pbr

Fixes: bug #1201253
Change-Id: I7cca000857f7691d4cb723d0a0c22a202da703f8
This commit is contained in:
sbauza 2013-08-20 11:57:00 +02:00
parent a0535d3da3
commit 2577682e33
2 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,11 @@ install-packages python-pip python-virtualenv
virtualenv --setuptools /opt/stack/venvs/os-apply-config
# bug #1201253 : virtualenv-1.10.1 embeds setuptools-0.9.8, which
# doesn't manage correctly HTTPS sockets when downloading pbr from
# https://pypi.python.org/simple/ if using http_proxy and https_proxy
# envvars
/opt/stack/venvs/os-apply-config/bin/pip install -U 'setuptools>=1.0'
/opt/stack/venvs/os-apply-config/bin/pip install -U os-apply-config
ln -s /opt/stack/venvs/os-apply-config/bin/os-apply-config /usr/local/bin/os-apply-config

View File

@ -32,6 +32,12 @@ function python-install() {
reqs=""
fi
# bug #1201253 : virtualenv-1.10.1 embeds setuptools-0.9.8, which
# doesn't manage correctly HTTPS sockets when downloading pbr from
# https://pypi.python.org/simple/ if using http_proxy and
# https_proxy envvars
pip install -U 'setuptools>=1.0'
if [ -n "$reqs" ] ; then
$pip_install -r $reqs
# FIXME: pip requires doesn't include MySQL-python