diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4b6cfca..cc65d5e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -358,14 +358,14 @@ jobs: id: wheel if: "github.event_name == 'push'" run: | - cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip wheel ." + cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip wheel -v ." shell: pwsh - uses: actions/upload-artifact@v3 if: "github.event_name == 'push'" with: name: wheels - path: dist\*.whl + path: "*.whl" success: needs: [build, windows] diff --git a/wheelbuild/config.sh b/wheelbuild/config.sh index 6571b70..a1037f9 100644 --- a/wheelbuild/config.sh +++ b/wheelbuild/config.sh @@ -4,7 +4,7 @@ set -eo pipefail CONFIG_DIR=$(abspath $(dirname "${BASH_SOURCE[0]}")) ARCHIVE_SDIR=pillow-avif-plugin-depends -LIBAVIF_VERSION=1.0.1 +LIBAVIF_VERSION=9575bb2a32346694b9b346652d6ea2c398e80721 AOM_VERSION=3.7.0 DAV1D_VERSION=1.2.1 SVT_AV1_VERSION=1.7.0 @@ -23,6 +23,11 @@ alias trace_off='{ set +x; } 2>/dev/null' alias trace_suppress='{ [[ $- =~ .*x.* ]] && trace_enabled=1 || trace_enabled=0; set +x; } 2>/dev/null' alias trace_restore='{ [ $trace_enabled -eq 1 ] && trace_on || trace_off; } 2>/dev/null' +if [ -n "$IS_MACOS" ] && [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then + CFLAGS="${CFLAGS} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" + LDFLAGS="${LDFLAGS} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +fi + call_and_restore_trace() { local rc local force_trace @@ -467,14 +472,11 @@ function build_libavif { group_start "Download libavif source" fetch_unpack \ - "https://github.com/AOMediaCodec/libavif/archive/v$LIBAVIF_VERSION.tar.gz" \ + "https://github.com/fdintino/libavif/archive/$LIBAVIF_VERSION.tar.gz" \ "libavif-$LIBAVIF_VERSION.tar.gz" group_end - (cd libavif-$LIBAVIF_VERSION \ - && patch -p1 -i $CONFIG_DIR/libavif-1.0.1-local-static.patch) - build_libsharpyuv mv libwebp-$LIBWEBP_SHA libavif-$LIBAVIF_VERSION/ext/libwebp LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBSHARPYUV=ON) @@ -489,11 +491,12 @@ function build_libavif { (cd libavif-$LIBAVIF_VERSION/build \ && cmake .. \ + -G "Ninja" \ -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -DBUILD_SHARED_LIBS=OFF \ "${LIBAVIF_CMAKE_FLAGS[@]}" \ - && make install) + && ninja -v install/strip) group_end } diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 5ebf402..384e706 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -177,10 +177,10 @@ def cmd_msbuild( "libavif": { "url": ( "https://github.com/fdintino/libavif/archive/" - "217e76487e7ca81057e8de1d3a2ab095e1c4fcb1.zip" + "9575bb2a32346694b9b346652d6ea2c398e80721.zip" ), - "filename": "libavif-217e76487e7ca81057e8de1d3a2ab095e1c4fcb1.zip", - "dir": "libavif-217e76487e7ca81057e8de1d3a2ab095e1c4fcb1", + "filename": "libavif-9575bb2a32346694b9b346652d6ea2c398e80721.zip", + "dir": "libavif-9575bb2a32346694b9b346652d6ea2c398e80721", "license": "LICENSE", "build": [ cmd_mkdir(r"ext\rav1e\build.libavif\usr"),