Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Amazon Linux 2023 #172

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
# Then run the remainder
- "alpine"
- "amazon-2-amd64"
- "amazon-2023-amd64"
- "arch"
- "centos-7-amd64"
- "centos-stream-8-amd64"
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TARGETS = \
alpine \
amazon-2-amd64 \
amazon-2023-amd64 \
arch \
centos-7-amd64 \
centos-stream-8-amd64 \
Expand Down
62 changes: 62 additions & 0 deletions amazon-2023-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM amazonlinux:2023

RUN yum install -y \
cmake \
findutils \
freetype-devel \
fribidi-devel \
gcc \
gcc-c++ \
ghostscript \
git \
harfbuzz-devel \
lcms2-devel \
libffi-devel \
libjpeg-devel \
libtiff-devel \
make \
openssl-devel \
python3-devel \
python3-pip \
python3-test \
python3-tkinter \
python3-virtualenv \
shadow-utils \
sudo \
tar \
unzip \
util-linux \
wget \
which \
xorg-x11-server-Xvfb \
xorg-x11-xauth \
zlib-devel \
&& yum clean all

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN useradd --uid 1000 pillow

RUN bash -c "/usr/bin/pip3 install virtualenv \
&& /usr/bin/python3 -mvirtualenv -p /usr/bin/python3 --system-site-packages /vpy3 \
&& /vpy3/bin/pip install --no-cache-dir --upgrade pip \
&& /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \
&& /vpy3/bin/pip install --no-cache-dir numpy --only-binary=:all: || true \
&& chown -R pillow:pillow /vpy3"

ADD depends /depends
RUN wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \
&& unzip ninja-linux.zip \
&& mv ninja /usr/bin
RUN /usr/bin/python3 -m pip install meson
RUN cd /depends \
&& ./install_imagequant.sh \
&& ./install_openjpeg.sh \
&& ./install_raqm.sh \
&& ./install_webp.sh

USER pillow
CMD ["depends/test.sh"]

#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/amazon-2023-amd64
1 change: 1 addition & 0 deletions amazon-2023-amd64/Makefile
9 changes: 9 additions & 0 deletions amazon-2023-amd64/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
source /vpy3/bin/activate
cd /Pillow
export DISPLAY=:99.0
export LD_LIBRARY_PATH=/usr/lib
make clean
make install-coverage
python3 -c "from PIL import Image"
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
3 changes: 3 additions & 0 deletions amazon-2023-amd64/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker pull amazonlinux:2023