diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c0d4ef..7256f25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,8 @@ jobs: ] python-version: [ "pypy-3.7", + "3.12", + "3.11", "3.10", "3.9", "3.8", diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e4b17fa..727852e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -13,125 +13,79 @@ env: jobs: build: - name: ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} + name: ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.arch == 'x86' && 'x86_64' || matrix.os == 'macos-11' && 'arm64' || 'aarch64' }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ "ubuntu-20.04", "macos-11" ] - python: [ "2.7", "3.7", "3.8", "3.9", "3.10", "3.11" ] - platform: [ "x86_64" ] - manylinux-version: [ "2010" ] - macos-target: [ "10.10" ] + python: [ "2.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] + arch: [ "x86", "arm" ] + manylinux-version: [ "2014" ] mb-ml-libc: [ "manylinux" ] - multibuild-sha: [ "34e970c4bc448b73af0127615fc4583b4f247369" ] exclude: - - python: "3.11" - manylinux-version: "2010" - - python: "3.11" - multibuild-sha: "34e970c4bc448b73af0127615fc4583b4f247369" + - python: "2.7" + os: "ubuntu-20.04" + manylinux-version: "2014" + - python: "3.7" + os: "ubuntu-20.04" + manylinux-version: "2014" + - python: "2.7" + os: "ubuntu-20.04" + arch: "arm" include: - - os: "macos-11" - os-name: "osx" - os: "ubuntu-20.04" + python: "2.7" + arch: "x86" manylinux-version: "2010" os-name: "manylinux2010" - - os: "macos-11" - os-name: "osx" - platform: "arm64" - python: "3.10" - macos-target: "11.0" - - os: "macos-11" - os-name: "osx" - platform: "arm64" - python: "3.9" - macos-target: "11.0" - - os: "macos-11" - os-name: "osx" - platform: "arm64" - python: "3.8" - macos-target: "11.0" - - os: "macos-11" - os-name: "osx" - platform: "arm64" + - os: "ubuntu-20.04" python: "3.7" - macos-target: "11.0" + arch: "x86" + manylinux-version: "2010" + os-name: "manylinux2010" - os: "macos-11" os-name: "osx" - platform: "arm64" - python: "2.7" - macos-target: "11.0" + - os: "ubuntu-20.04" + manylinux-version: "2014" + os-name: "manylinux2014" - python: "3.8" - platform: "x86_64" + arch: "x86" mb-ml-libc: "musllinux" os: "ubuntu-20.04" os-name: "musllinux" - manylinux-version: "" + manylinux-version: "_1_1" - python: "3.9" - platform: "x86_64" + arch: "x86" mb-ml-libc: "musllinux" os: "ubuntu-20.04" os-name: "musllinux" - manylinux-version: "" + manylinux-version: "_1_1" - python: "3.10" - platform: "x86_64" + arch: "x86" mb-ml-libc: "musllinux" os: "ubuntu-20.04" os-name: "musllinux" - manylinux-version: "" - - python: "3.8" - platform: "aarch64" - os: "ubuntu-20.04" - os-name: "manylinux2014" - manylinux-version: "2014" - - python: "3.9" - platform: "aarch64" - os: "ubuntu-20.04" - os-name: "manylinux2014" - manylinux-version: "2014" - - python: "3.10" - platform: "aarch64" - os: "ubuntu-20.04" - os-name: "manylinux2014" - manylinux-version: "2014" + manylinux-version: "_1_1" - python: "3.11" - platform: "x86_64" - os: "macos-11" - os-name: "osx" - macos-target: "10.10" - multibuild-sha: "bb32cfec4f755cb146332a0490abcf3187ce61d1" - - python: "3.11" - platform: "arm64" - os: "macos-11" - os-name: "osx" - macos-target: "11.0" - multibuild-sha: "bb32cfec4f755cb146332a0490abcf3187ce61d1" - - python: "3.11" - platform: "x86_64" + arch: "x86" mb-ml-libc: "musllinux" os: "ubuntu-20.04" os-name: "musllinux" - manylinux-version: "" - multibuild-sha: "bb32cfec4f755cb146332a0490abcf3187ce61d1" - - python: "3.11" - platform: "aarch64" - os: "ubuntu-20.04" - os-name: "manylinux2014" - manylinux-version: "2014" - multibuild-sha: "bb32cfec4f755cb146332a0490abcf3187ce61d1" - - python: "3.11" - platform: "x86_64" + manylinux-version: "_1_1" + - python: "3.12" + arch: "x86" + mb-ml-libc: "musllinux" os: "ubuntu-20.04" - os-name: "manylinux2014" - manylinux-version: "2014" - multibuild-sha: "bb32cfec4f755cb146332a0490abcf3187ce61d1" + os-name: "musllinux" + manylinux-version: "_1_1" env: BUILD_COMMIT: HEAD - PLAT: ${{ matrix.platform }} + PLAT: ${{ matrix.arch == 'x86' && 'x86_64' || matrix.os == 'macos-11' && 'arm64' || 'aarch64' }} MB_PYTHON_VERSION: ${{ matrix.python }} TRAVIS_OS_NAME: ${{ matrix.os-name }} MB_ML_VER: ${{ matrix.manylinux-version }} - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm' && '11.0' || '10.10' }} MB_ML_LIBC: ${{ matrix.mb-ml-libc }} steps: - uses: actions/checkout@v3 @@ -149,7 +103,7 @@ jobs: with: repository: multi-build/multibuild path: multibuild - ref: ${{ matrix.multibuild-sha }} + ref: ${{ (matrix.python == '3.11' || matrix.python == '3.12') && '452dd2d1705f6b2375369a6570c415beb3163f70' || '34e970c4bc448b73af0127615fc4583b4f247369' }} - uses: actions/setup-python@v4 with: @@ -157,7 +111,7 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 - if: ${{ matrix.platform == 'aarch64' }} + if: ${{ matrix.os == 'ubuntu-20.04' && matrix.arch == 'arm' }} - name: Setup env_vars run: | @@ -172,7 +126,7 @@ jobs: with: path: pillow-avif-plugin/depends/libavif-${{ env.LIBAVIF_VERSION }} key: - ${{ env.LIBAVIF_VERSION }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*') }}-${{ matrix.os }}-${{ matrix.platform }} + ${{ env.LIBAVIF_VERSION }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*') }}-${{ matrix.os }}-${{ env.PLAT }} - name: Cache ccache/sccache uses: actions/cache@v3 @@ -181,11 +135,11 @@ jobs: ccache sccache key: - cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }} + cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }} restore-keys: | - cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }} - cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }} - cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}- + cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }} + cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }} + cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}- - name: Build Wheel run: pillow-avif-plugin/wheelbuild/build.sh diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 4ceca00..0d1f4b9 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ def readme(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Multimedia :: Graphics", diff --git a/tox.ini b/tox.ini index d5215e6..7496666 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,37,38,39,310,py37} +envlist = py{27,37,38,39,310,311,312,py37} minversion = 1.9 [gh-actions] @@ -10,6 +10,8 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312 pypy-3.7: pypy37 [testenv] @@ -27,8 +29,7 @@ setenv = GCNO_TARGET_DIR={envdir}/temp COVERAGE_FILE={toxworkdir}/coverage/.coverage.{envname} commands = - {envpython} setup.py clean - {envpython} setup.py build_ext --build-lib {envdir}/src --build-temp {envdir} develop + {envpython} -m pip install -e . -v {envpython} -m pytest -W always {posargs: -vv --cov pillow_avif --cov tests --cov-report term} {envpython} -c "import os; os.path.exists('{toxworkdir}/coverage') or os.makedirs('{toxworkdir}/coverage')" - gcovr -r {toxinidir} --object-directory {envdir} -k \