From f8ce2adc72a0d54f143986d92c7eafa0a694e79e Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Sat, 6 Jul 2024 13:07:59 +0300 Subject: [PATCH] dropped 32-bit wheels for Pi-Heif (#262) Signed-off-by: Alexander Piskun --- .github/transform_to-pi_heif.py | 2 - .github/workflows/build-cache-deps.yml | 73 +--------------------- .github/workflows/test-src-build-linux.yml | 4 -- .github/workflows/test-wheels-pi_heif.yml | 4 -- .github/workflows/wheels-pi_heif.yml | 64 ------------------- README.md | 2 - docker/manylinux_armv7l_wheels.Dockerfile | 47 -------------- docker/musllinux_armv7l_wheels.Dockerfile | 45 ------------- pi-heif/README.md | 2 - 9 files changed, 1 insertion(+), 242 deletions(-) delete mode 100644 docker/manylinux_armv7l_wheels.Dockerfile delete mode 100644 docker/musllinux_armv7l_wheels.Dockerfile diff --git a/.github/transform_to-pi_heif.py b/.github/transform_to-pi_heif.py index fa60594d..b1202565 100644 --- a/.github/transform_to-pi_heif.py +++ b/.github/transform_to-pi_heif.py @@ -11,8 +11,6 @@ # change `pillow_heif` to `pi_heif` files_list = [ "setup.py", - "docker/manylinux_armv7l_wheels.Dockerfile", - "docker/musllinux_armv7l_wheels.Dockerfile", "docker/test_wheels.Dockerfile", "MANIFEST.in", "pillow_heif/_pillow_heif.c", diff --git a/.github/workflows/build-cache-deps.yml b/.github/workflows/build-cache-deps.yml index b18317fb..8c70b55e 100644 --- a/.github/workflows/build-cache-deps.yml +++ b/.github/workflows/build-cache-deps.yml @@ -77,7 +77,7 @@ jobs: fail-fast: true matrix: cibw_buildlinux: [ manylinux, musllinux ] - cibw_arch: [ "aarch64", "i686", "x86_64" ] + cibw_arch: [ "aarch64", "x86_64" ] name: Pi-Heif • ${{ matrix.cibw_arch }} • ${{ matrix.cibw_buildlinux }} runs-on: ubuntu-20.04 env: @@ -100,18 +100,6 @@ jobs: - name: Install cibuildwheel & twine run: python3 -m pip install twine cibuildwheel==2.19.1 - - name: 32-bit musllinux preparations - if: matrix.cibw_buildlinux == 'musllinux' && matrix.cibw_arch == 'i686' - run: echo INSTALL_OS_PACKAGES="apk update && apk --no-cache add $OS_PACKAGES" >> $GITHUB_ENV - env: - OS_PACKAGES: "fribidi-dev harfbuzz-dev jpeg-dev lcms2-dev openjpeg-dev" - - - name: 32-bit manylinux preparations - if: matrix.cibw_buildlinux == 'manylinux' && matrix.cibw_arch == 'i686' - run: echo INSTALL_OS_PACKAGES="yum makecache && yum install -y $OS_PACKAGES" >> $GITHUB_ENV - env: - OS_PACKAGES: "libjpeg-turbo-devel lcms2-devel" - - uses: actions/cache@v4 with: path: ${{ env.BUILD_DIR }} @@ -143,62 +131,3 @@ jobs: - name: Fix cache permissions run: sudo chmod -R 777 ${{ env.BUILD_DIR }} - - pi_heif_dependencies_linux_armv7: - strategy: - fail-fast: true - matrix: - i: [ - { "docker_file": "manylinux_armv7l_wheels", "name": "manylinux" }, - { "docker_file": "musllinux_armv7l_wheels", "name": "musllinux" }, - ] - v: ["3.10"] - name: Pi-Heif • ARMv7l • ${{ matrix.i['name'] }} - runs-on: ubuntu-20.04 - env: - KEY_HEAD: Pi-Heif-ARMv7l-${{ matrix.i['name'] }} - BUILD_DIR: "./build_cache" - - steps: - - uses: actions/checkout@v4 - - name: Transform to Pi-Heif - run: | - cp -r -v ./pi-heif/* . - python3 .github/transform_to-pi_heif.py - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: actions/cache@v4 - with: - path: ${{ env.BUILD_DIR }} - key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} - env: - KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} - KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} - - - name: Build Pi-Heif - uses: docker/build-push-action@v6 - with: - context: . - file: docker/${{ matrix.i['docker_file'] }}.Dockerfile - build-args: | - PY_VERSION=${{ matrix.v }} - platforms: linux/arm/v7 - push: false - outputs: type=local,dest=./ - - - name: Checking built wheels - run: | - python3 -m pip install twine - python3 -m twine check ./repaired_dist/* - - - name: Uploading wheels - uses: actions/upload-artifact@v3 - with: - name: wheels_pi_heif - path: ./repaired_dist/*.whl - if-no-files-found: error - - - name: Fix cache permissions - run: sudo chmod -R 777 ${{ env.BUILD_DIR }} diff --git a/.github/workflows/test-src-build-linux.yml b/.github/workflows/test-src-build-linux.yml index 41a59bff..19ab858d 100644 --- a/.github/workflows/test-src-build-linux.yml +++ b/.github/workflows/test-src-build-linux.yml @@ -38,10 +38,6 @@ jobs: arch: ["amd64", "arm64"] docker_file: ["Alpine_3_19", "Alpine_3_20", "Almalinux_9", "Debian_12"] include: - - arch: "arm/v7" - docker_file: "Alpine_3_20" - - arch: "arm/v7" - docker_file: "Debian_12" - arch: "amd64" docker_file: "Archlinux" - arch: "amd64" diff --git a/.github/workflows/test-wheels-pi_heif.yml b/.github/workflows/test-wheels-pi_heif.yml index 5aacf83c..8dcd5d6a 100644 --- a/.github/workflows/test-wheels-pi_heif.yml +++ b/.github/workflows/test-wheels-pi_heif.yml @@ -20,16 +20,12 @@ jobs: { "os": "fedora", "ver": "37", "arch": "amd64" }, { "os": "debian", "ver": "11", "arch": "amd64" }, { "os": "debian", "ver": "11", "arch": "arm64" }, - { "os": "debian", "ver": "11", "arch": "arm/v7" }, { "os": "debian", "ver": "12", "arch": "amd64" }, { "os": "debian", "ver": "12", "arch": "arm64" }, - { "os": "debian", "ver": "12", "arch": "arm/v7" }, { "os": "alpine", "ver": "3.19", "arch": "amd64" }, { "os": "alpine", "ver": "3.19", "arch": "arm64" }, - { "os": "alpine", "ver": "3.19", "arch": "arm/v7" }, { "os": "alpine", "ver": "3.20", "arch": "amd64" }, { "os": "alpine", "ver": "3.20", "arch": "arm64" }, - { "os": "alpine", "ver": "3.20", "arch": "arm/v7" }, ] steps: diff --git a/.github/workflows/wheels-pi_heif.yml b/.github/workflows/wheels-pi_heif.yml index a831f753..49e20772 100644 --- a/.github/workflows/wheels-pi_heif.yml +++ b/.github/workflows/wheels-pi_heif.yml @@ -249,70 +249,6 @@ jobs: - name: Fix cache permissions run: sudo chmod -R 777 ${{ env.BUILD_DIR }} - wheels_armv7l: - name: ${{ matrix.i['name'] }} • ARMv7 • CPython${{ matrix.v }} - runs-on: ubuntu-20.04 - strategy: - matrix: - i: [ - { "docker_file": "manylinux_armv7l_wheels", "name": "manylinux" }, - ] - v: ["3.9", "3.10", "3.11", "3.12"] - include: - - v: "3.10" - i: { "docker_file": "musllinux_armv7l_wheels", "name": "musllinux" } - - v: "3.11" - i: { "docker_file": "musllinux_armv7l_wheels", "name": "musllinux" } - - v: "3.12" - i: { "docker_file": "musllinux_armv7l_wheels", "name": "musllinux" } - env: - KEY_HEAD: Pi-Heif-ARMv7l-${{ matrix.i['name'] }} - BUILD_DIR: "./build_cache" - - steps: - - uses: actions/checkout@v4 - - name: Transform to Pi-Heif - run: | - cp -r -v ./pi-heif/* . - python3 .github/transform_to-pi_heif.py - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: actions/cache@v4 - with: - path: ${{ env.BUILD_DIR }} - key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} - env: - KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} - KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} - - - name: Build Pi-Heif - uses: docker/build-push-action@v6 - with: - context: . - file: docker/${{ matrix.i['docker_file'] }}.Dockerfile - build-args: | - PY_VERSION=${{ matrix.v }} - platforms: linux/arm/v7 - push: false - outputs: type=local,dest=./ - - - name: Checking built wheels - run: | - python3 -m pip install twine - python3 -m twine check ./repaired_dist/* - - - name: Uploading wheels - uses: actions/upload-artifact@v3 - with: - name: wheels_pi_heif - path: ./repaired_dist/*.whl - if-no-files-found: error - - - name: Fix cache permissions - run: sudo chmod -R 777 ${{ env.BUILD_DIR }} - sdist: name: Source distribution runs-on: macos-12 diff --git a/README.md b/README.md index db5f4958..523707b2 100644 --- a/README.md +++ b/README.md @@ -154,5 +154,3 @@ if im.info["depth_images"]: | PyPy 3.10 v7.3 | ✅ | ✅ | ✅ | N/A | ✅ | * **x86_64**, **aarch64** wheels. - -`i686`, `ARMv7l`, `PyPy` 32-bit wheels are published only for [pi-heif](https://pypi.org/project/pi-heif/) from `0.13.0` version. diff --git a/docker/manylinux_armv7l_wheels.Dockerfile b/docker/manylinux_armv7l_wheels.Dockerfile deleted file mode 100644 index 04d31675..00000000 --- a/docker/manylinux_armv7l_wheels.Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -ARG PY_VERSION - -FROM python:$PY_VERSION-bullseye - -COPY . / - -RUN \ - apt-get update && \ - apt-get install -y \ - libfribidi-dev \ - libharfbuzz-dev \ - libjpeg-dev \ - liblcms2-dev \ - libffi-dev \ - libtool \ - git \ - wget \ - autoconf \ - automake \ - cmake - -RUN \ - echo "**** Installing patchelf ****" && \ - git clone -b 0.17.2 https://github.com/NixOS/patchelf.git && \ - cd patchelf && \ - ./bootstrap.sh && ./configure && make && make install && \ - cd .. - -ARG PY_VERSION -RUN \ - echo "**** Install python build dependencies ****" && \ - python3 -m pip install wheel && \ - python3 -m pip install pytest Pillow && \ - echo "**** Start building ****" && \ - export BUILD_DIR="/build_cache" && \ - python3 libheif/linux_build_libs.py && \ - python3 setup.py bdist_wheel -d dist_manylinux && \ - echo "**** Repairing wheel ****" && \ - PTAG=$(echo $PY_VERSION | tr -d '.' | tr -d '"') && \ - python3 -m pip install auditwheel && \ - python3 -m auditwheel repair -w repaired_dist/ dist_manylinux/*-cp$PTAG-*.whl --plat manylinux_2_31_armv7l && \ - echo "**** Testing wheel ****" && \ - python3 -m pip install repaired_dist/*-cp$PTAG-*manylinux*.whl && \ - python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \ - export PH_LIGHT_ACTION=1 && \ - python3 -m pytest && \ - echo "**** Build Done ****" diff --git a/docker/musllinux_armv7l_wheels.Dockerfile b/docker/musllinux_armv7l_wheels.Dockerfile deleted file mode 100644 index 08a301cf..00000000 --- a/docker/musllinux_armv7l_wheels.Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -ARG PY_VERSION - -FROM python:$PY_VERSION-alpine3.19 - -COPY . / - -RUN \ - apk add --no-cache \ - libtool \ - perl \ - alpine-sdk \ - cmake \ - autoconf \ - automake \ - fribidi-dev \ - harfbuzz-dev \ - jpeg-dev \ - lcms2-dev - -RUN \ - echo "**** Installing patchelf ****" && \ - git clone -b 0.17.2 https://github.com/NixOS/patchelf.git && \ - cd patchelf && \ - ./bootstrap.sh && ./configure && make && make install && \ - cd .. - -ARG PY_VERSION -RUN \ - echo "**** Install python build dependencies ****" && \ - python3 -m pip install wheel && \ - python3 -m pip install pytest Pillow && \ - echo "**** Start building ****" && \ - export BUILD_DIR="/build_cache" && \ - python3 libheif/linux_build_libs.py && \ - python3 setup.py bdist_wheel -d dist_musllinux && \ - echo "**** Repairing wheel ****" && \ - PTAG=$(echo $PY_VERSION | tr -d '.' | tr -d '"') && \ - python3 -m pip install auditwheel && \ - python3 -m auditwheel repair -w repaired_dist/ dist_musllinux/*-cp$PTAG-*.whl && \ - echo "**** Testing wheel ****" && \ - python3 -m pip install repaired_dist/*-cp$PTAG-*musllinux*.whl && \ - python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \ - export PH_LIGHT_ACTION=1 && \ - python3 -m pytest && \ - echo "**** Build Done ****" diff --git a/pi-heif/README.md b/pi-heif/README.md index 1b63c05f..12e5d49e 100644 --- a/pi-heif/README.md +++ b/pi-heif/README.md @@ -95,5 +95,3 @@ if im.info["depth_images"]: | PyPy 3.10 v7.3 | ✅ | ✅ | ✅ | N/A | ✅ | * **x86_64**, **aarch64** wheels. - -`ARMv7l`: wheels are present for Debian 11+(Ubuntu 20.04+) and Alpine 3.16+