From 6988dc051e313d2d4fbd0d789d2a5a045c13b6ab Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Wed, 16 Oct 2024 10:12:31 -0400 Subject: [PATCH] fix windows, py313 builds --- .github/workflows/wheels-test.ps1 | 2 +- .github/workflows/wheels.yml | 4 ++-- setup.py | 26 ++++++++++++++++---------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/wheels-test.ps1 b/.github/workflows/wheels-test.ps1 index 097b38c..6b413ce 100644 --- a/.github/workflows/wheels-test.ps1 +++ b/.github/workflows/wheels-test.ps1 @@ -1,4 +1,4 @@ -param ([string]$venv, [string]$pillow_avif_plugin="C:\pillow_avif_plugin") +param ([string]$venv, [string]$pillow_avif_plugin="C:\pillow-avif-plugin") $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' Set-PSDebug -Trace 1 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index faac4fb..1babbd4 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -311,12 +311,12 @@ jobs: CIBW_PRERELEASE_PYTHONS: True CIBW_TEST_SKIP: "*-win_arm64" CIBW_TEST_COMMAND: 'docker run --rm - -v {project}:C:\pillow + -v {project}:C:\pillow-avif-plugin -v C:\cibw:C:\cibw -v %CD%\..\venv-test:%CD%\..\venv-test -e CI -e GITHUB_ACTIONS mcr.microsoft.com/windows/servercore:ltsc2022 - powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test' + powershell C:\pillow-avif-plugin\.github\workflows\wheels-test.ps1 %CD%\..\venv-test' shell: cmd - name: Upload wheels diff --git a/setup.py b/setup.py index 4f07351..0664d6d 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,21 @@ def readme(): ] ) +test_requires = [ + "gcovr", + "pytest", + "packaging", + "pytest-cov", + "test-image-results", + "pillow", +] + +if sys.version_info[:2] == (3, 13): + test_requires += [ + "git+https://github.com/cython/cython.git@" + "7beedb19c43f3e865056b8181e55897b222a645b#egg=cython" + ] + setup( name="pillow-avif-plugin", description="A pillow plugin that adds avif support via libavif", @@ -64,16 +79,7 @@ def readme(): url="https://github.com/fdintino/pillow-avif-plugin/", download_url="https://github.com/fdintino/pillow-avif-plugin/releases", install_requires=[], - extras_require={ - "tests": [ - "gcovr", - "pytest", - "packaging", - "pytest-cov", - "test-image-results", - "pillow", - ] - }, + extras_require={"tests": test_requires}, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment",