From c45d781c9661ae8d4d4787fb740db842fb26b805 Mon Sep 17 00:00:00 2001 From: Chapman Shoop Date: Sun, 4 Aug 2019 14:17:04 -0700 Subject: [PATCH] Dockerfiles for testing python2/3 --- Dockerfile.test_py2 | 26 ++++++++++++++++++++++++++ Dockerfile.test_py3 | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Dockerfile.test_py2 create mode 100644 Dockerfile.test_py3 diff --git a/Dockerfile.test_py2 b/Dockerfile.test_py2 new file mode 100644 index 00000000..56f7b70b --- /dev/null +++ b/Dockerfile.test_py2 @@ -0,0 +1,26 @@ +# Dockerfile for testing PyBitmessage with Python 2 +# docker build -f Dockerfile.test_py2 . + +FROM ubuntu:xenial + +RUN apt-get update +RUN apt-get install -yq --no-install-suggests --no-install-recommends \ + build-essential libcap-dev python-all-dev python-setuptools virtualenv + +WORKDIR /home/bitmessage +RUN ln -s src pybitmessage # tests environment + +ENV VIRTUAL_ENV=/home/bitmessage/venv +RUN virtualenv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +RUN python --version +RUN pip --version + +ADD requirements.txt . +RUN pip install -r requirements.txt + +ADD . . + +RUN python setup.py install +RUN python setup.py test diff --git a/Dockerfile.test_py3 b/Dockerfile.test_py3 new file mode 100644 index 00000000..56c57f0a --- /dev/null +++ b/Dockerfile.test_py3 @@ -0,0 +1,27 @@ +# Dockerfile for testing PyBitmessage with Python 3 +# docker build -f Dockerfile.test_py3 . + +FROM ubuntu:xenial + +RUN apt-get update +RUN apt-get install -yq --no-install-suggests --no-install-recommends \ + build-essential libcap-dev libssl-dev python3-all-dev python3-setuptools \ + virtualenv + +WORKDIR /home/bitmessage +RUN ln -s src pybitmessage # tests environment + +ENV VIRTUAL_ENV=/home/bitmessage/venv +RUN virtualenv -p python3 $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +RUN python --version +RUN pip --version + +ADD requirements.txt . +RUN pip install -r requirements.txt + +ADD . . + +RUN python setup.py install +RUN python setup.py test