From 0da50788e1dcefb79fc83744381cf69f5a2c9197 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 1 Apr 2023 00:39:01 +1100 Subject: [PATCH] Fedora 26 with Python 3.9 --- .github/workflows/build.yml | 39 ------------------------------------- Pillow | 2 +- fedora-36-amd64/Dockerfile | 29 +++++++++++++++++---------- fedora-36-amd64/test.sh | 6 +++--- 4 files changed, 23 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fd8119c..abec1398 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,6 @@ name: Docker images on: [push, pull_request, workflow_dispatch] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: build: name: ${{ matrix.target }} + ${{ matrix.image }} @@ -17,38 +13,7 @@ jobs: target: - "latest" image: - # Run slower jobs first to give them a headstart and reduce waiting time - - "ubuntu-22.04-jammy-arm64v8" - - "ubuntu-22.04-jammy-ppc64le" - - "ubuntu-22.04-jammy-s390x" - # test image for manylinux-wheel build - - "ubuntu-22.04-jammy-amd64" - # Then run the remainder - - "alpine" - - "amazon-2-amd64" - - "amazon-2023-amd64" - - "arch" - - "centos-7-amd64" - - "centos-stream-8-amd64" - - "centos-stream-9-amd64" - - "debian-11-bullseye-x86" - "fedora-36-amd64" - - "fedora-37-amd64" - - "gentoo" - - "ubuntu-18.04-bionic-amd64" - - "ubuntu-20.04-focal-amd64" - - "ubuntu-22.04-jammy-amd64-valgrind" - # has a dependency on the test image - - "manylinux2014-wheel-build" - include: - - image: "manylinux2014-wheel-build" - test-image: "ubuntu-22.04-jammy-amd64" - - image: "ubuntu-22.04-jammy-arm64v8" - qemu-arch: "aarch64" - - image: "ubuntu-22.04-jammy-ppc64le" - qemu-arch: "ppc64le" - - image: "ubuntu-22.04-jammy-s390x" - qemu-arch: "s390x" steps: - uses: actions/checkout@v3 @@ -63,10 +28,6 @@ jobs: - name: Prepare build run: | sudo apt-get update && sudo apt-get install -qyy debootstrap - if [ "${{ matrix.target }}" = "latest" ]; then - git submodule update --remote Pillow - (cd Pillow && git checkout main) - fi sudo chown -R 1000 $(pwd) - name: Test Image Build diff --git a/Pillow b/Pillow index a5bbab1c..15384395 160000 --- a/Pillow +++ b/Pillow @@ -1 +1 @@ -Subproject commit a5bbab1c1e63b439de191ef2040173713b26d2da +Subproject commit 153843956a587e656085af8dc443b2ae24bd60db diff --git a/fedora-36-amd64/Dockerfile b/fedora-36-amd64/Dockerfile index cdf03b09..4b089f71 100644 --- a/fedora-36-amd64/Dockerfile +++ b/fedora-36-amd64/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:36 +FROM fedora:26 RUN dnf install -y \ freetype-devel \ @@ -7,19 +7,20 @@ RUN dnf install -y \ harfbuzz-devel \ lcms2-devel \ libimagequant-devel \ + libffi-devel \ libjpeg-devel \ libraqm-devel \ libtiff-devel \ libwebp-devel \ make \ openjpeg2-devel \ - python3-devel \ - python3-tkinter \ - python3-virtualenv \ + openssl-devel \ + sqlite-devel \ redhat-rpm-config \ tcl-devel \ tk-devel \ util-linux \ + wget \ which \ xorg-x11-server-Xvfb \ zlib-devel \ @@ -28,15 +29,23 @@ RUN dnf install -y \ RUN useradd pillow \ && chown pillow:pillow /home/pillow -RUN virtualenv -p /usr/bin/python3.10 --system-site-packages /vpy3 \ +RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz \ + && tar xzf Python-3.9.15.tgz \ + && cd Python-3.9.15 \ + && ./configure \ + && make altinstall \ + && cd .. \ + && rm -r Python-3.9.15 Python-3.9.15.tgz + +RUN python3.9 -m pip install virtualenv \ + && python3.9 -m virtualenv --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 - -USER pillow -CMD ["depends/test.sh"] +RUN python3.9 -m pip install Pillow +RUN python3.9 -m PIL +RUN python3.9 -c "from PIL import Image, ImageFont;ImageFont.core.test" -#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/fedora-36-amd64 +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/fedora-26-amd64 diff --git a/fedora-36-amd64/test.sh b/fedora-36-amd64/test.sh index f1b1726c..a5fd939c 100755 --- a/fedora-36-amd64/test.sh +++ b/fedora-36-amd64/test.sh @@ -2,6 +2,6 @@ source /vpy3/bin/activate cd /Pillow make clean -make install-coverage -python3 -c "from PIL import Image" -/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests +python3 -m pip install Pillow +python3 -m PIL +python3 -c "from PIL import Image, ImageFont;ImageFont.core.test"