mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-31 02:19:58 +03:00
Include in Windows x86 wheels (#38)
* Added release notes * Simplified code * AVIF works on Windows x86 --------- Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
This commit is contained in:
parent
7607474b42
commit
22222373f2
6
.github/workflows/wheels-dependencies.sh
vendored
6
.github/workflows/wheels-dependencies.sh
vendored
|
@ -111,11 +111,11 @@ function build_libavif {
|
||||||
local build_type=MinSizeRel
|
local build_type=MinSizeRel
|
||||||
local lto=ON
|
local lto=ON
|
||||||
|
|
||||||
local libavif_cmake_flags=()
|
local libavif_cmake_flags
|
||||||
|
|
||||||
if [ -n "$IS_MACOS" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
lto=OFF
|
lto=OFF
|
||||||
libavif_cmake_flags+=(
|
libavif_cmake_flags=(
|
||||||
-DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto " \
|
-DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto " \
|
||||||
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto" \
|
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto" \
|
||||||
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,-S,-x,-dead_strip_dylibs" \
|
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,-S,-x,-dead_strip_dylibs" \
|
||||||
|
@ -124,7 +124,7 @@ function build_libavif {
|
||||||
if [[ "$MB_ML_VER" == 2014 ]] && [[ "$PLAT" == "x86_64" ]]; then
|
if [[ "$MB_ML_VER" == 2014 ]] && [[ "$PLAT" == "x86_64" ]]; then
|
||||||
build_type=Release
|
build_type=Release
|
||||||
fi
|
fi
|
||||||
libavif_cmake_flags+=(-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,--strip-all,-z,relro,-z,now")
|
libavif_cmake_flags=(-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,--strip-all,-z,relro,-z,now")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz)
|
local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
import struct
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from PIL import features
|
from PIL import features
|
||||||
|
@ -21,8 +20,8 @@ def test_wheel_modules() -> None:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
expected_modules.remove("tkinter")
|
expected_modules.remove("tkinter")
|
||||||
|
|
||||||
# libavif is not available on Windows for x86 and ARM64 architectures
|
# libavif is not available on Windows for ARM64 architectures
|
||||||
if platform.machine() == "ARM64" or struct.calcsize("P") == 4:
|
if platform.machine() == "ARM64":
|
||||||
expected_modules.remove("avif")
|
expected_modules.remove("avif")
|
||||||
|
|
||||||
assert set(features.get_supported_modules()) == expected_modules
|
assert set(features.get_supported_modules()) == expected_modules
|
||||||
|
|
|
@ -47,6 +47,12 @@ TODO
|
||||||
Other changes
|
Other changes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
AVIF support in wheels
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Support for reading and writing AVIF images is now included in Pillow's wheels, with
|
||||||
|
libaom available as an encoder and dav1d as a decoder.
|
||||||
|
|
||||||
Python 3.14 beta
|
Python 3.14 beta
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
@ -760,7 +760,7 @@ def main() -> None:
|
||||||
disabled += ["libimagequant"]
|
disabled += ["libimagequant"]
|
||||||
if args.no_fribidi:
|
if args.no_fribidi:
|
||||||
disabled += ["fribidi"]
|
disabled += ["fribidi"]
|
||||||
if args.no_avif or args.architecture != "AMD64":
|
if args.no_avif or args.architecture == "ARM64":
|
||||||
disabled += ["libavif"]
|
disabled += ["libavif"]
|
||||||
|
|
||||||
prefs = {
|
prefs = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user