From 95163d77dd0d3ebfa3a6ed898ab80ca7b6b0a260 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Mon, 23 Jan 2017 11:56:24 -0800 Subject: [PATCH] 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 --- docker/openstack-base/Dockerfile.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 2b136d7..6eb719d 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -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 \