Bump pillow-heif to 0.20.0 and pyheif 0.8.0 (#5178)

Co-authored-by: Teon L Brooks <teon.brooks@gmail.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
This commit is contained in:
Gyeongjae Choi 2024-12-02 22:14:32 +09:00 committed by GitHub
parent f3b2c4f3b4
commit 0812961b0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 39 additions and 38 deletions

View File

@ -5,8 +5,8 @@ package:
- library
- shared_library
source:
url: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz
sha256: e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718
url: https://github.com/strukturag/libheif/releases/download/v1.17.3/libheif-1.17.3.tar.gz
sha256: 8d5b6292e7931324f81f871f250ecbb9f874aa3c66b4f6f35ceb0bf3163b53ea
requirements:
host:
@ -22,6 +22,8 @@ build:
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCMAKE_INSTALL_PREFIX=${WASM_LIBRARY_DIR} \
-DWITH_EXAMPLES=OFF \
-DWITH_X265=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DLIBDE265_INCLUDE_DIR=${WASM_LIBRARY_DIR}/include \
-DLIBDE265_LIBRARY=${WASM_LIBRARY_DIR}/lib/libde265.a \

View File

@ -0,0 +1,30 @@
package:
name: pillow-heif
version: 0.20.0
top-level:
- pillow_heif
source:
url: https://files.pythonhosted.org/packages/eb/82/d8eb6a8b5d7dd88e887f977eb6f5deedafd85be53343dcc761f363658db8/pillow_heif-0.20.0.tar.gz
sha256: cac19c4434ab776f833160d61f3cbeddb347bd8ed2f82205b243eba5c572fa33
# patches:
# - patches/0001-Remove-include-path-check.patch
requirements:
run:
- cffi
- Pillow
- libheif
host:
- cffi
- libheif
build:
script: |
export LIBHEIF_ROOT=${WASM_LIBRARY_DIR}
test:
imports:
- pillow_heif
about:
home: https://github.com/bigcat88/pillow_heif
PyPI: https://pypi.org/project/pillow_heif
summary: Python 3.6+ interface to libheif library
license: LGPL-2.1
# Note: this package needs to be manually upgraded to the next version

View File

@ -10,7 +10,7 @@ SAMPLE_IMAGE = base64.b64encode(
def test_heif(selenium):
@run_in_pyodide(packages=["Pillow", "pillow_heif"])
@run_in_pyodide(packages=["Pillow", "pillow-heif"])
def _test_heif_inner(selenium, image_base64):
import base64
@ -24,14 +24,12 @@ def test_heif(selenium):
"tree-with-transparency.heic", convert_hdr_to_8bit=False
)
assert heif_file.mode == "RGBA"
assert len(heif_file.data) == 278784
assert heif_file.stride == 1056
_test_heif_inner(selenium, SAMPLE_IMAGE)
def test_pillow(selenium):
@run_in_pyodide(packages=["Pillow", "pillow_heif"])
@run_in_pyodide(packages=["Pillow", "pillow-heif"])
def _test_pillow_inner(selenium, image_base64):
import base64

View File

@ -1,29 +0,0 @@
package:
name: pillow_heif
version: 0.8.0
source:
url: https://files.pythonhosted.org/packages/65/88/ca9aa1adb641c792f277a610f2adf4a6792bc2783177cb95bedcc687fac0/pillow_heif-0.8.0.tar.gz
sha256: 0b50f4dc159127df06b0960136e06384ed4eba34d9eafbc200ebc973e403c90c
patches:
- patches/0001-Remove-include-path-check.patch
requirements:
run:
- cffi
- Pillow
- libheif
host:
- cffi
- libheif
build:
script: |
sed -i "s@include_dirs = \[@include_dirs = ['\\${WASM_LIBRARY_DIR}/include', @" libheif/build.py
sed -i "s@library_dirs = \[@library_dirs = ['\\${WASM_LIBRARY_DIR}/lib', @" libheif/build.py
test:
imports:
- pillow_heif
about:
home: https://github.com/bigcat88/pillow_heif
PyPI: https://pypi.org/project/pillow_heif
summary: Python 3.6+ interface to libheif library
license: LGPL-2.1
# Note: this package needs to be manually upgraded to the next version

View File

@ -1,9 +1,9 @@
package:
name: pyheif
version: 0.7.1
version: 0.8.0
source:
url: https://files.pythonhosted.org/packages/f3/2f/0492ad16c6936944bf9575a789e2dd6af4a27eb2475a04fb02cf84b2a5db/pyheif-0.7.1.tar.gz
sha256: 86a5c5174379d7146b5ed1a68892faf7268a135fb7f5039a011bfb7a6e903200
url: https://files.pythonhosted.org/packages/ec/11/d63f215d8c9c416409e2d665bf7594a8886780629296b4f0d35857561c9b/pyheif-0.8.0.tar.gz
sha256: e9b4c11ebad482fc25a0804ce295b44b660cbf7829a228f56b071f325f9e0de4
requirements:
run:
- cffi