]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
pyenv: also install requirements for python2
authorDaniel Axtens <dja@axtens.net>
Tue, 28 Jan 2020 13:55:20 +0000 (00:55 +1100)
committerStephen Finucane <stephen@that.guru>
Thu, 27 Feb 2020 22:28:50 +0000 (22:28 +0000)
The first time you do a migration with python3, you get a whole
lot of seemingly null changes. This is a bit annoying so I use
py2 to generate the changes. To do that, first fix the pyenv
transition so requirements are still installed for python2.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
tools/docker/Dockerfile

index 62ac461b7fccfbc0d4923f11a474dcf3157f18ee..ba7ae29567326a54e1627cee713fcf228b981ba8 100644 (file)
@@ -51,14 +51,22 @@ RUN pyenv latest install 2.7 && \
     pyenv latest install 3.6 && \
     pyenv latest install 3.7 && \
     pyenv latest install 3.8
-RUN pyenv global $(pyenv versions --bare | tac)
-
-RUN pip install tox tox-pyenv
 
 # we deliberately leave the requirements files in /opt so we can ping the user
 # in entrypoint.sh if they change
 COPY requirements-dev.txt requirements-test.txt /opt/
-RUN pip install -r /opt/requirements-dev.txt
+
+# old python 2.7 deps
+RUN pyenv global $(pyenv versions --bare)
+
+RUN pip install tox tox-pyenv && \
+    pip install -r /opt/requirements-dev.txt
+
+# most recent python deps
+RUN pyenv global $(pyenv versions --bare | tac)
+
+RUN pip install tox tox-pyenv && \
+    pip install -r /opt/requirements-dev.txt
 
 COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]