Skip to content

Commit

Permalink
dropped python 3.7 support, added pypy3.10
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Jul 17, 2023
1 parent 52dd4c5 commit 68e4415
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analysis-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12.0-beta.4'
python-version: '3.12-dev'

- name: Prepare system
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-src-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'

- uses: msys2/setup-msys2@v2
with:
location: C:/temp
Expand Down Expand Up @@ -83,6 +87,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Transform to Pi-Heif
run: |
cp -r -v -force ./pi-heif/* .
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-wheels-pi_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Wheels test • Pi-Heif
on:
release:
types: [ published ]
workflow_dispatch:

jobs:
docker-tests:
Expand Down Expand Up @@ -75,8 +76,9 @@ jobs:
name: Windows • 2019 • ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
env:
PH_LIGHT_ACTION: 1

Expand All @@ -94,7 +96,7 @@ jobs:

- name: Preparations
run: |
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
Expand All @@ -106,8 +108,9 @@ jobs:
name: macOS • 11 • ${{ matrix.python-version }}
runs-on: macos-11
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.8", "pypy-3.9", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -123,7 +126,7 @@ jobs:
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
Expand All @@ -137,8 +140,9 @@ jobs:
name: Ubuntu-Focal • ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.8", "pypy-3.9", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -154,7 +158,7 @@ jobs:
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
Expand All @@ -168,7 +172,7 @@ jobs:
runs-on: macos-12
strategy:
matrix:
python-version: ["pypy-3.8", "3.8"]
python-version: ["pypy-3.9", "3.9"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -184,7 +188,7 @@ jobs:
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
Expand All @@ -203,7 +207,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["pypy-3.8", "3.10"]
python-version: ["pypy-3.10", "3.10"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -219,7 +223,7 @@ jobs:
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/test-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Wheels test
on:
release:
types: [ published ]
workflow_dispatch:

jobs:
docker-tests:
Expand Down Expand Up @@ -39,13 +40,8 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Test type is Full
if: matrix.i['arch'] != 'arm/v7'
run: echo TEST_TYPE="export PH_FULL_ACTION=1" >> $GITHUB_ENV

- name: Test type is Light
if: matrix.i['arch'] == 'arm/v7'
run: echo TEST_TYPE="export PH_LIGHT_ACTION=1" >> $GITHUB_ENV

- name: Preparing debian
if: matrix.i['os'] == 'debian' || matrix.i['os'] == 'ubuntu'
run: |
Expand Down Expand Up @@ -79,7 +75,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
env:
PH_FULL_ACTION: 1

Expand All @@ -97,7 +93,7 @@ jobs:

- name: Preparations
run: |
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pillow_heif
- name: Test wheel
Expand All @@ -108,7 +104,7 @@ jobs:
runs-on: macos-11
strategy:
matrix:
python-version: ["pypy-3.8", "pypy-3.9", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -124,7 +120,7 @@ jobs:
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pillow_heif
- name: Test wheel
Expand All @@ -138,7 +134,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["pypy-3.8", "pypy-3.9", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]

steps:
- name: Delay, waiting Pypi to update.
Expand All @@ -154,7 +150,7 @@ jobs:
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install pytest pillow numpy pympler defusedxml
python3 -m pip install pytest pillow packaging defusedxml
python3 -m pip install --only-binary=:all: pillow_heif
- name: Test wheel
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/wheels-pillow_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,71 +173,6 @@ jobs:
- name: Fix cache permissions
run: sudo chmod -R 777 ${{ env.BUILD_DIR }}

wheels_linux_cpython_32bit:
strategy:
fail-fast: true
matrix:
cibw_buildlinux: [ manylinux, musllinux ]
cibw_arch: [ "i686" ]
name: ${{ matrix.cibw_buildlinux }} • ${{ matrix.cibw_arch }} • CPython
runs-on: ubuntu-20.04
env:
BUILD_DIR: "/tmp/ph_build_stuff"
KEY_HEAD: ${{ matrix.cibw_arch }}-${{ matrix.cibw_buildlinux }}

steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.cibw_arch == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: musllinux preparations
if: matrix.cibw_buildlinux == 'musllinux'
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'
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@v3
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: Run cibuildwheel
run: |
python3 -m pip install cibuildwheel==2.12.3
python3 -m cibuildwheel
env:
CIBW_BUILD: ${{ format('cp3*-{0}_{1}', matrix.cibw_buildlinux, matrix.cibw_arch) }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_BEFORE_ALL_LINUX: ${{ env.INSTALL_OS_PACKAGES }}
CIBW_ENVIRONMENT_LINUX: BUILD_DIR=/host${{ env.BUILD_DIR }} PH_LIGHT_ACTION=1

- name: Checking built wheels
run: |
python3 -m pip install twine
python3 -m twine check wheelhouse/*
- name: Uploading wheels
uses: actions/upload-artifact@v3
with:
name: wheels_pillow_heif
path: wheelhouse/*.whl
if-no-files-found: error

- name: Fix cache permissions
run: sudo chmod -R 777 ${{ env.BUILD_DIR }}

wheels_linux_pypy:
strategy:
fail-fast: true
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
All notable changes to this project will be documented in this file.

## [0.1x.x - 2023-0x-xx]
## [0.13.0 - 2023-08-0x]

### Changed

- The license for the project itself has been changed to "BSD-3-Clause" since "Apache 2.0" is not compatible with the "x265" encoder. #111
- Minimum required `Pillow` version increased from `8.4.0` to `9.1.1`
- Dropped `Python 3.7` support, `PyPy 3.8` wheels.
- Dropped 32 bit wheels for `Pillow-Heif`. `Pi-Heif` still have 32-bit wheels.

## [0.12.0 - 2023-07-08]

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![docs](https://readthedocs.org/projects/pillow-heif/badge/?version=latest)](https://pillow-heif.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/bigcat88/pillow_heif/branch/master/graph/badge.svg?token=JY64F2OL6V)](https://codecov.io/gh/bigcat88/pillow_heif)

![PythonVersion](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![PythonVersion](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
![impl](https://img.shields.io/pypi/implementation/pillow_heif)
![pypi](https://img.shields.io/pypi/v/pillow_heif.svg)
[![Downloads](https://static.pepy.tech/personalized-badge/pillow-heif?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/pillow-heif)
Expand Down Expand Up @@ -122,7 +122,6 @@ pillow_heif.register_avif_opener()

| **_Wheels table_** | macOS<br/>Intel | macOS<br/>Silicon | Windows<br/>64bit | musllinux* | manylinux* |
|--------------------|:---------------:|:-----------------:|:-----------------:|:----------:|:----------:|
| CPython 3.7 || N/A || N/A ||
| CPython 3.8 ||||||
| CPython 3.9 ||||||
| CPython 3.10 ||||||
Expand All @@ -131,6 +130,6 @@ pillow_heif.register_avif_opener()
| PyPy 3.8 v7.3 || N/A || N/A ||
| PyPy 3.9 v7.3 || N/A || N/A ||

&ast; **i686**, **x86_64**, **aarch64** wheels.
&ast; **x86_64**, **aarch64** wheels.

`ARMv7l`, `PyPy` 32-bit wheels are published only for [pi-heif](https://pypi.org/project/pi-heif/) from `0.10.0` version.
3 changes: 1 addition & 2 deletions pi-heif/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Analysis & Coverage](https://github.com/bigcat88/pillow_heif/actions/workflows/analysis-coverage.yml/badge.svg)](https://github.com/bigcat88/pillow_heif/actions/workflows/analysis-coverage.yml)
[![Wheels test(Pi-Heif)](https://github.com/bigcat88/pillow_heif/actions/workflows/test-wheels-pi_heif.yml/badge.svg)](https://github.com/bigcat88/pillow_heif/actions/workflows/test-wheels-pi_heif.yml)

![PythonVersion](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![PythonVersion](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
![impl](https://img.shields.io/pypi/implementation/pi_heif)
![pypi](https://img.shields.io/pypi/v/pi_heif.svg)

Expand Down Expand Up @@ -63,7 +63,6 @@ if pi_heif.is_supported("input.heic"):

| **_Wheels table_** | macOS<br/>Intel | macOS<br/>Silicon | Windows<br/>64bit | musllinux* | manylinux* |
|--------------------|:---------------:|:-----------------:|:-----------------:|:----------:|:----------:|
| CPython 3.7 || N/A || N/A ||
| CPython 3.8 ||||||
| CPython 3.9 ||||||
| CPython 3.10 ||||||
Expand Down
3 changes: 1 addition & 2 deletions pi-heif/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers =
Topic :: Multimedia :: Graphics
Topic :: Multimedia :: Graphics :: Graphics Conversion
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -34,7 +33,7 @@ project_urls =
Changelog=https://github.com/bigcat88/pillow_heif/blob/master/CHANGELOG.md

[options]
python_requires = >=3.7
python_requires = >=3.8
zip_safe = False
packages = find:
install_requires =
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=67.8",
"wheel",
]

[tool.black]
line-length = 120
target-versions = ["py37"]
target-versions = ["py38"]
preview = true

[tool.ruff]
Expand Down Expand Up @@ -48,7 +48,7 @@ warn_no_return = true
strict_optional = true

[tool.pylint]
master.py-version = "3.7"
master.py-version = "3.8"
master.extension-pkg-allow-list = ["_pillow_heif"]
design.max-attributes = 8
design.max-branches = 16
Expand All @@ -69,7 +69,7 @@ messages_control.disable = [

[tool.cibuildwheel]
build-verbosity = "2"
skip = ["cp36-*", "pp37-*", "cp37-musllinux*"]
skip = ["cp36-* cp37-* pp37-* pp38-*"]

[tool.cibuildwheel.linux]
test-extras = "tests"
Expand Down
Loading

0 comments on commit 68e4415

Please sign in to comment.