Skip to content

Commit

Permalink
Merge pull request #72 from radarhere/remove-python2
Browse files Browse the repository at this point in the history
Removed Python 2
  • Loading branch information
hugovk committed Dec 6, 2019
2 parents 3f071f7 + 36abf86 commit 7c5b072
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 157 deletions.
13 changes: 4 additions & 9 deletions alpine/Dockerfile
Expand Up @@ -7,16 +7,16 @@

FROM alpine

RUN apk --no-cache add python python3 \
RUN apk --no-cache add python3 \
build-base \
python-dev python3-dev \
python3-dev \
# wget dependency
openssl \
# dev dependencies
git \
bash \
sudo \
py2-pip \
py3-pip \
# Pillow dependencies
jpeg-dev \
zlib-dev \
Expand All @@ -33,12 +33,7 @@ ADD depends /depends
RUN cd /depends && ./install_webp.sh && ./install_imagequant.sh && ./install_raqm.sh

RUN /usr/sbin/adduser -D pillow && \
pip install virtualenv && virtualenv /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
virtualenv -p python3.7 /vpy3 && \
pip3 install virtualenv && virtualenv /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
7 changes: 1 addition & 6 deletions alpine/test.sh
@@ -1,11 +1,6 @@
#!/bin/bash
source /vpy/bin/activate
cd /Pillow
make clean
LIBRARY_PATH=/lib:/usr/lib make install-coverage
pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
cd /Pillow
make clean
LIBRARY_PATH=/lib:/usr/lib make install-coverage
pytest -vx --cov PIL --cov-report term Tests
9 changes: 2 additions & 7 deletions amazon-1-amd64/Dockerfile
Expand Up @@ -2,20 +2,15 @@ FROM amazonlinux:1

run yum install -y shadow-utils util-linux xorg-x11-xauth \
findutils which \
python27 python27-virtualenv python36 python36-devel \
python36 python36-virtualenv python36-devel \
gcc xorg-x11-server-Xvfb ghostscript sudo wget cmake \
libtiff-devel libjpeg-devel zlib-devel freetype-devel \
lcms2-devel libwebp-devel \
libffi-devel

RUN useradd --uid 1000 pillow

RUN bash -c "/usr/bin/virtualenv -p python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
/usr/bin/virtualenv -p python3.6 --system-site-packages /vpy3 && \
RUN bash -c "/usr/bin/virtualenv-3.6 -p python3.6 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
7 changes: 1 addition & 6 deletions amazon-1-amd64/test.sh
@@ -1,13 +1,8 @@
#!/bin/bash
source /vpy/bin/activate
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
export LD_LIBRARY_PATH=/usr/lib
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
4 changes: 2 additions & 2 deletions amazon-2-amd64/Dockerfile
Expand Up @@ -4,7 +4,7 @@ run amazon-linux-extras install python3

run yum install -y shadow-utils util-linux xorg-x11-xauth \
findutils which \
python3-devel python3-test python3-tkinter python-virtualenv \
python3-devel python3-test python3-tkinter python3-virtualenv \
gcc xorg-x11-server-Xvfb ghostscript sudo wget cmake make \
libtiff-devel libjpeg-devel zlib-devel freetype-devel \
lcms2-devel libwebp-devel harfbuzz-devel fribidi-devel \
Expand All @@ -18,7 +18,7 @@ RUN bash -c "/usr/bin/pip3 install virtualenv && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy "
chown -R pillow:pillow /vpy"

ADD depends /depends
RUN cd /depends && ./install_imagequant.sh && ./install_openjpeg.sh && ./install_raqm.sh
Expand Down
12 changes: 2 additions & 10 deletions arch/Dockerfile
Expand Up @@ -6,11 +6,9 @@ FROM greyltc/archlinux
RUN pacman -Syu --noconfirm \
wget
RUN pacman -Sy --noconfirm \
python2 python \
python2-virtualenv \
python \
python-virtualenv \
gcc make git sudo \
python2-setuptools \
python-setuptools \
extra/libjpeg-turbo \
extra/openjpeg2 \
Expand All @@ -23,8 +21,7 @@ RUN pacman -Sy --noconfirm \
mesa-libgl \
xorg-server-xvfb \
ghostscript \
python2-pyqt5 \
python-pyqt5 \
python-pyqt5 \
pkg-config \
extra/fribidi \
extra/harfbuzz
Expand All @@ -34,11 +31,6 @@ ADD depends /depends
RUN cd /depends && ./install_imagequant.sh && ./install_raqm.sh

RUN /sbin/useradd -m -U -u 1000 pillow && \
virtualenv2 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install nose cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
virtualenv --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install nose cffi olefile pytest pytest-cov && \
Expand Down
7 changes: 1 addition & 6 deletions arch/test.sh
@@ -1,11 +1,6 @@
#!/bin/bash
source /vpy/bin/activate
cd /Pillow
make clean
make install-coverage
QT_QPA_PLATFORM=offscreen /usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
cd /Pillow
make clean
make install-coverage
QT_QPA_PLATFORM=offscreen /usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
12 changes: 2 additions & 10 deletions centos-6-amd64/Dockerfile
Expand Up @@ -2,23 +2,15 @@ FROM centos:6

run yum install -y epel-release centos-release-scl

run yum install -y python27 rh-python36 python-virtualenv \
run yum install -y rh-python36 rh-python36-python-virtualenv \
gcc xorg-x11-server-Xvfb ghostscript sudo \
libtiff-devel libjpeg-devel zlib-devel freetype-devel \
lcms2-devel libwebp-devel openjpeg2-devel tkinter \
tcl-devel tk-devel libffi-devel

RUN useradd --uid 1000 pillow

RUN bash -c "source /opt/rh/python27/enable && \
/opt/rh/python27/root/usr/bin/virtualenv -p python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
cat /opt/rh/python27/enable /vpy/bin/activate > /vpy/bin/activate2.7 && \
mv /vpy/bin/activate2.7 /vpy/bin/activate && \
chown -R pillow:pillow /vpy && \
source /opt/rh/rh-python36/enable && \
RUN bash -c "source /opt/rh/rh-python36/enable && \
/opt/rh/rh-python36/root/usr/bin/virtualenv -p python3.6 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
Expand Down
7 changes: 1 addition & 6 deletions centos-6-amd64/test.sh
@@ -1,12 +1,7 @@
#!/bin/bash
source /vpy/bin/activate
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
12 changes: 2 additions & 10 deletions centos-7-amd64/Dockerfile
Expand Up @@ -2,7 +2,7 @@ FROM centos:7

run yum install -y epel-release centos-release-scl

run yum install -y python27 rh-python36 python-virtualenv \
run yum install -y rh-python36 rh-python36-python-virtualenv \
gcc xorg-x11-server-Xvfb make which ghostscript sudo \
libtiff-devel libjpeg-devel zlib-devel freetype-devel \
lcms2-devel libwebp-devel openjpeg2-devel tkinter \
Expand All @@ -11,15 +11,7 @@ run yum install -y python27 rh-python36 python-virtualenv \

RUN useradd --uid 1000 pillow

RUN bash -c "source /opt/rh/python27/enable && \
/opt/rh/python27/root/usr/bin/virtualenv -p python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
cat /opt/rh/python27/enable /vpy/bin/activate > /vpy/bin/activate2.7 && \
mv /vpy/bin/activate2.7 /vpy/bin/activate && \
chown -R pillow:pillow /vpy && \
source /opt/rh/rh-python36/enable && \
RUN bash -c "source /opt/rh/rh-python36/enable && \
/opt/rh/rh-python36/root/usr/bin/virtualenv -p python3.6 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
Expand Down
7 changes: 1 addition & 6 deletions centos-7-amd64/test.sh
@@ -1,12 +1,7 @@
#!/bin/bash
source /vpy/bin/activate
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
17 changes: 6 additions & 11 deletions debian-10-buster-x86/Dockerfile
Expand Up @@ -33,24 +33,19 @@ RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d \

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y \
install xvfb sudo \
git wget python-numpy python-scipy netpbm \
python-qt4 ghostscript libffi-dev libjpeg-turbo-progs \
python-setuptools python-virtualenv \
python-dev python3-dev cmake \
git wget python3-numpy python3-scipy netpbm \
python3-pyqt5 ghostscript libffi-dev libjpeg-turbo-progs \
python3-setuptools virtualenv \
python3-dev cmake \
libtiff5-dev libjpeg62-turbo-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev \
python-tk python3-tk \
python3-tk \
libharfbuzz-dev libfribidi-dev && apt-get clean

RUN useradd pillow && addgroup pillow sudo && \
mkdir /home/pillow && chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
virtualenv -p /usr/bin/python3.7 --system-site-packages /vpy3 && \
RUN virtualenv -p /usr/bin/python3.7 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
7 changes: 1 addition & 6 deletions debian-10-buster-x86/test.sh
@@ -1,12 +1,7 @@
#!/bin/bash
source /vpy/bin/activate
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
17 changes: 6 additions & 11 deletions debian-9-stretch-x86/Dockerfile
Expand Up @@ -33,24 +33,19 @@ RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d \

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y \
install xvfb sudo \
git wget python-numpy python-scipy netpbm \
python-qt4 ghostscript libffi-dev libjpeg-turbo-progs \
python-setuptools python-virtualenv \
python-dev python3-dev cmake \
git wget python3-numpy python3-scipy netpbm \
ghostscript libffi-dev libjpeg-turbo-progs \
python3-setuptools virtualenv \
python3-dev cmake \
libtiff5-dev libjpeg62-turbo-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev \
python-tk python3-tk \
python3-tk \
libharfbuzz-dev libfribidi-dev && apt-get clean

RUN useradd pillow && addgroup pillow sudo && \
mkdir /home/pillow && chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
virtualenv -p /usr/bin/python3.5 --system-site-packages /vpy3 && \
RUN virtualenv -p /usr/bin/python3.5 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
7 changes: 1 addition & 6 deletions debian-9-stretch-x86/test.sh
@@ -1,12 +1,7 @@
#!/bin/bash
source /vpy/bin/activate
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
11 changes: 3 additions & 8 deletions fedora-30-amd64/Dockerfile
@@ -1,22 +1,17 @@
FROM fedora:30

RUN dnf install -y redhat-rpm-config \
python-devel python3-devel python-virtualenv python3-virtualenv make gcc \
python3-devel python3-virtualenv make gcc \
libtiff-devel libjpeg-devel zlib-devel freetype-devel \
lcms2-devel libwebp-devel openjpeg2-devel tkinter python3-tkinter \
lcms2-devel libwebp-devel openjpeg2-devel python3-tkinter \
tcl-devel tk-devel harfbuzz-devel fribidi-devel libraqm-devel \
libimagequant-devel \
xorg-x11-server-Xvfb which

RUN useradd pillow && \
chown pillow:pillow /home/pillow

RUN /usr/bin/python2.7 /usr/lib/python2.7/site-packages/virtualenv.py --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
/usr/bin/python3.7 /usr/lib/python3.7/site-packages/virtualenv.py --system-site-packages /vpy3 && \
RUN /usr/bin/python3.7 /usr/lib/python3.7/site-packages/virtualenv.py --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
6 changes: 0 additions & 6 deletions fedora-30-amd64/test.sh
@@ -1,10 +1,4 @@
#!/bin/bash
source /vpy/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
cd /Pillow
make clean
Expand Down
15 changes: 5 additions & 10 deletions ubuntu-16.04-xenial-amd64/Dockerfile
Expand Up @@ -2,24 +2,19 @@ FROM ubuntu:xenial

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y \
install sudo xvfb \
git wget python-virtualenv python-numpy python-scipy netpbm \
python-pyqt5 ghostscript libffi-dev libjpeg-turbo-progs \
python-dev python-setuptools \
git wget virtualenv python3-numpy python3-scipy netpbm \
python3-pyqt5 ghostscript libffi-dev libjpeg-turbo-progs \
python3-setuptools \
python3-dev cmake \
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev \
python-tk python3-tk \
python3-tk \
libharfbuzz-dev libfribidi-dev && apt-get clean

RUN useradd pillow && addgroup pillow sudo && \
mkdir /home/pillow && chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python2.7 --system-site-packages /vpy && \
/vpy/bin/pip install --upgrade pip && \
/vpy/bin/pip install cffi olefile pytest pytest-cov && \
/vpy/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy && \
virtualenv -p /usr/bin/python3.5 --system-site-packages /vpy3 && \
RUN virtualenv -p /usr/bin/python3.5 --system-site-packages /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install cffi olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
Expand Down
6 changes: 0 additions & 6 deletions ubuntu-16.04-xenial-amd64/test.sh
@@ -1,10 +1,4 @@
#!/bin/bash
source /vpy/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests

source /vpy3/bin/activate
cd /Pillow
make clean
Expand Down

0 comments on commit 7c5b072

Please sign in to comment.