Use constraints when install virtualenv

Without this we get too fresh virtualenv while we have packages versions
conflicting with it in constraints.txt. Also disable downloading random
(fresh) versions of packages by virtualenv and remove --upgrade from
pip. setuptools package is not mentioned in constraints.txt because it
is expected to be installed at proper version by virtualenv, so we
shouldn't upgrade it to later versions.

Right now we end up installing latest virtualenv 15.1.0 with
setuptools 34.0.0 which depends on packaging>=16.8 while for Newton we
have packaging===16.7.0 in constraints.txt

Change-Id: I07ea9e2cf83dd0c1bf330556ad0aee7139dd1ef0
This commit is contained in:
Yuriy Taraday 2017-01-23 11:56:24 -08:00
parent dba9d5a5e9
commit 95163d77dd
1 changed files with 3 additions and 3 deletions

View File

@ -17,11 +17,11 @@ COPY {{ render('pip.conf.j2') }} /tmp/pip.conf
{{ copy_sources("openstack/requirements", "/tmp/requirements") }}
RUN pip --no-cache-dir install -U virtualenv \
&& virtualenv /var/lib/microservices/venv \
RUN pip --no-cache-dir install --constraint /tmp/requirements/upper-constraints.txt -U virtualenv \
&& virtualenv --no-download /var/lib/microservices/venv \
&& mv /tmp/requirements/upper-constraints.txt /var/lib/microservices/venv/constraints.txt \
&& mv /tmp/pip.conf /var/lib/microservices/venv \
&& /var/lib/microservices/venv/bin/pip install --upgrade \
&& /var/lib/microservices/venv/bin/pip install \
Babel \
Mako \
MarkupSafe \