]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docker: Install dependencies for Python 2 also
authorStephen Finucane <stephenfinucane@hotmail.com>
Sat, 3 Sep 2016 17:49:02 +0000 (18:49 +0100)
committerStephen Finucane <stephenfinucane@hotmail.com>
Mon, 19 Sep 2016 23:11:29 +0000 (00:11 +0100)
Aspects of both Patchwork and Django, such as the 'makemigrations'
management command, function differently under Python 3. It should be
possible to run these commands under Python 2. Install dependencies in
the Python 2 environment to make this a possibility.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Acked-by: Daniel Axtens <dja@axtens.net>
tools/docker/Dockerfile

index b39204c6e0b84316f60a8a5c503500450a683656..883d43ab839f93bcef6134b370b59e4497135c9f 100644 (file)
@@ -30,9 +30,12 @@ RUN useradd --uid=$UID --create-home patchwork
 # Python requirements.
 # If you update requirements, you should rebuild the container.
 # entrypoint.sh will prompt you to do this.
+# we install both Python 2 and Python 3 versions so you can use either
 COPY requirements-*.txt /tmp/
-RUN pip3  install virtualenv tox && \
-    pip3  install -r /tmp/requirements-dev.txt
+RUN pip3 install virtualenv tox && \
+    pip3 install -r /tmp/requirements-dev.txt
+RUN pip2 install virtualenv tox && \
+    pip2 install -r /tmp/requirements-dev.txt
 # we deliberately leave the requirements files in tmp so we can
 # ping the user in entrypoint.sh if the change them!