Skip to content

Commit 9853976

Browse files
authored
Upgrade from Python 3.9 (#244)
2 parents a433273 + cc2e83b commit 9853976

File tree

3 files changed

+29
-23
lines changed

3 files changed

+29
-23
lines changed

amazon-2-amd64/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ RUN yum install -y \
1515
libjpeg-devel \
1616
libtiff-devel \
1717
make \
18-
openssl-devel \
19-
sqlite-devel \
18+
openssl11-devel \
2019
pth-devel \
2120
shadow-utils \
21+
sqlite-devel \
2222
sudo \
2323
tar \
2424
tk-devel \
@@ -36,19 +36,19 @@ ENV PATH="/root/.cargo/bin:${PATH}"
3636

3737
RUN useradd --uid 1001 pillow
3838

39-
RUN wget https://www.python.org/ftp/python/3.9.16/Python-3.9.16.tgz \
40-
&& tar xzf Python-3.9.16.tgz \
41-
&& cd Python-3.9.16 \
39+
RUN wget https://www.python.org/ftp/python/3.10.18/Python-3.10.18.tgz \
40+
&& tar xzf Python-3.10.18.tgz \
41+
&& cd Python-3.10.18 \
4242
&& ./configure \
4343
&& make altinstall \
4444
&& cd .. \
45-
&& rm -r Python-3.9.16 Python-3.9.16.tgz
45+
&& rm -r Python-3.10.18 Python-3.10.18.tgz
4646

4747
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
4848
ARG PIP_NO_CACHE_DIR=1
4949

50-
RUN bash -c "python3.9 -m pip install virtualenv \
51-
&& python3.9 -m virtualenv --system-site-packages /vpy3 \
50+
RUN bash -c "python3.10 -m pip install virtualenv \
51+
&& python3.10 -m virtualenv --system-site-packages /vpy3 \
5252
&& /vpy3/bin/pip install --upgrade pip \
5353
&& /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \
5454
&& /vpy3/bin/pip install numpy --only-binary=:all: || true \
@@ -58,8 +58,8 @@ ADD depends /depends
5858
RUN wget https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-linux.zip \
5959
&& unzip ninja-linux.zip \
6060
&& mv ninja /usr/bin
61-
RUN python3.9 -m pip install meson
62-
RUN ln -s /usr/local/bin/python3.9 /usr/bin/python3
61+
RUN python3.10 -m pip install meson
62+
RUN ln -s /usr/local/bin/python3.10 /usr/bin/python3
6363
RUN cd /depends \
6464
&& ./install_imagequant.sh \
6565
&& ./install_openjpeg.sh \

amazon-2023-amd64/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ RUN yum install -y \
1616
make \
1717
nasm \
1818
openssl-devel \
19-
python3-devel \
20-
python3-pip \
21-
python3-test \
22-
python3-tkinter \
23-
python3-virtualenv \
19+
python3.11-devel \
20+
python3.11-pip \
21+
python3.11-test \
22+
python3.11-tkinter \
2423
shadow-utils \
2524
sudo \
2625
tar \
@@ -41,8 +40,8 @@ RUN useradd --uid 1001 pillow
4140
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
4241
ARG PIP_NO_CACHE_DIR=1
4342

44-
RUN bash -c "/usr/bin/pip3 install virtualenv \
45-
&& /usr/bin/python3 -mvirtualenv -p /usr/bin/python3 --system-site-packages /vpy3 \
43+
RUN bash -c "/usr/bin/python3.11 -m pip install virtualenv \
44+
&& /usr/bin/python3.11 -mvirtualenv -p /usr/bin/python3.11 --system-site-packages /vpy3 \
4645
&& /vpy3/bin/pip install --upgrade pip \
4746
&& /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \
4847
&& /vpy3/bin/pip install numpy --only-binary=:all: || true \
@@ -52,7 +51,7 @@ ADD depends /depends
5251
RUN wget https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-linux.zip \
5352
&& unzip ninja-linux.zip \
5453
&& mv ninja /usr/bin
55-
RUN /usr/bin/python3 -m pip install meson
54+
RUN /usr/bin/python3.11 -m pip install meson
5655
RUN cd /depends \
5756
&& ./install_imagequant.sh \
5857
&& ./install_libavif.sh \

centos-stream-9-amd64/Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ RUN yum install -y \
2121
nasm \
2222
openjpeg2-devel \
2323
openssl-devel \
24-
python3-devel \
25-
python3-pip \
26-
python3-tkinter \
24+
sqlite-devel \
2725
sudo \
2826
tcl-devel \
2927
tk-devel \
@@ -35,17 +33,26 @@ RUN yum install -y \
3533

3634
RUN useradd --uid 1001 pillow
3735

36+
RUN wget https://www.python.org/ftp/python/3.10.18/Python-3.10.18.tgz \
37+
&& tar xzf Python-3.10.18.tgz \
38+
&& cd Python-3.10.18 \
39+
&& ./configure \
40+
&& make altinstall \
41+
&& cd .. \
42+
&& rm -r Python-3.10.18 Python-3.10.18.tgz
43+
3844
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
3945
ARG PIP_NO_CACHE_DIR=1
4046

41-
RUN bash -c "python3.9 -m pip install virtualenv \
42-
&& python3.9 -m virtualenv --system-site-packages /vpy3 \
47+
RUN bash -c "python3.10 -m pip install virtualenv \
48+
&& python3.10 -m virtualenv --system-site-packages /vpy3 \
4349
&& /vpy3/bin/pip install --upgrade pip \
4450
&& /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \
4551
&& /vpy3/bin/pip install numpy --only-binary=:all: || true \
4652
&& chown -R pillow:pillow /vpy3"
4753

4854
COPY depends /depends
55+
RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3
4956
RUN cd /depends \
5057
&& ./install_imagequant.sh \
5158
&& ./install_libavif.sh \

0 commit comments

Comments
 (0)