From 9b87025faec76b87806986e7784613672a64a92b95e0b4848aecea164e8373bf Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 26 Mar 2023 16:57:03 +0000 Subject: [PATCH] Accepting request 1074234 from home:bnavigator:branches:devel:languages:python - Update to 2023.3.16 * Pass 6884 tests. * Require libjpeg-turbo 2.1.91 (3.0 beta) and c-blosc2 2.7.1. * Add experimental type hints. * Add SZIP codec via libaec library. * Use Zstd streaming API to decode blocks with unknown decompressed size. * Remove unused level, index, and numthreads parameters (breaking). * Make AEC and BLOSC constants enums (breaking). * Capitalize numcodecs class names (breaking). * Remove JPEG12 codec (breaking; use JPEG8 instead). * Encode and decode lossless and 12-bit JPEG with JPEG8 codec by default. * Remove JPEGSOF3 fallback in JPEG codec. * Fix slow IFD seeking with libtiff 4.5. * Fixes for Cython 3.0. - Release 2023.1.23 * Require libjxl 0.8. * Change mapping of level to distance parameter in jpegxl_encode. * Add option to specify bitspersample in jpegxl_encode. * Add option to pass de/linearize tables to LJPEG codec. * Fix lj92 decoder for SSSS=16 (#59). * Prefer ljpeg over jpegsof3 codec. * Add option to specify AVIF encoder codec. * Support LERC with Zstd or Deflate compression. * Squeeze chunk arrays by default in numcodecs image compression codecs. - Skip testing with dask on python 3.11: no numba yet - Add blosc2, SVT-AV1, jpegxl (libjxl)), SZIP (libsz2) OBS-URL: https://build.opensuse.org/request/show/1074234 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=21 --- always-cythonize.patch | 12 +++++------ imagecodecs-2022.12.24.tar.gz | 3 --- imagecodecs-2023.3.16.tar.gz | 3 +++ imagecodecs_distributor_setup.py | 10 ++++++--- python-imagecodecs.changes | 35 ++++++++++++++++++++++++++++++++ python-imagecodecs.spec | 30 +++++++++++++++++---------- 6 files changed, 70 insertions(+), 23 deletions(-) delete mode 100644 imagecodecs-2022.12.24.tar.gz create mode 100644 imagecodecs-2023.3.16.tar.gz diff --git a/always-cythonize.patch b/always-cythonize.patch index e421e01..6931cae 100644 --- a/always-cythonize.patch +++ b/always-cythonize.patch @@ -1,8 +1,8 @@ -Index: imagecodecs-2022.12.24/setup.py +Index: imagecodecs-2023.3.16/setup.py =================================================================== ---- imagecodecs-2022.12.24.orig/setup.py -+++ imagecodecs-2022.12.24/setup.py -@@ -85,7 +85,7 @@ def ext(**kwargs): +--- imagecodecs-2023.3.16.orig/setup.py ++++ imagecodecs-2023.3.16/setup.py +@@ -84,7 +84,7 @@ def ext(**kwargs): extra_link_args=[], depends=[], cython_compile_time_env={}, @@ -11,8 +11,8 @@ Index: imagecodecs-2022.12.24/setup.py ) d.update(kwargs) return d -@@ -106,13 +106,13 @@ OPTIONS = { - 'extra_link_args': [], +@@ -105,13 +105,13 @@ OPTIONS = { + 'extra_link_args': [], # ['-debug:full'] 'depends': ['imagecodecs/_shared.pxd'], 'cython_compile_time_env': {}, - 'cythonize': False, # sys.version_info >= (3, 11) diff --git a/imagecodecs-2022.12.24.tar.gz b/imagecodecs-2022.12.24.tar.gz deleted file mode 100644 index d671d73..0000000 --- a/imagecodecs-2022.12.24.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5282a808786dadb8e3ee238bb213b2e065574f1bb0f4b51e8bf93747e0babb3 -size 13747904 diff --git a/imagecodecs-2023.3.16.tar.gz b/imagecodecs-2023.3.16.tar.gz new file mode 100644 index 0000000..a2b536e --- /dev/null +++ b/imagecodecs-2023.3.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e39c2a63f7f5b9bee0ba4961db8c1e7f2518ce07d2fd10a56624d17f1407efc1 +size 22452941 diff --git a/imagecodecs_distributor_setup.py b/imagecodecs_distributor_setup.py index f9f2588..de2f803 100644 --- a/imagecodecs_distributor_setup.py +++ b/imagecodecs_distributor_setup.py @@ -9,11 +9,9 @@ def customize_build(EXTENSIONS, OPTIONS): includedir = os.getenv("INCDIR",'') + '/' del EXTENSIONS['apng'] # png-apng library not available - del EXTENSIONS['blosc2'] # blosc2 library not available del EXTENSIONS['brunsli'] # graphics/brunsli not in Factory del EXTENSIONS['jetraw'] # jetraw library not available - del EXTENSIONS['jpeg12'] # jpeg12 requires custom build - del EXTENSIONS['jpegxl'] # jpeg-xl library not available + del EXTENSIONS['jpeg8'] # jpeg8 / libjegturbo 2.1.91 is beta and not available del EXTENSIONS['lerc'] # LERC library not available del EXTENSIONS['lz4f'] # requires static linking del EXTENSIONS['mozjpeg'] # Win32 only @@ -32,6 +30,11 @@ def customize_build(EXTENSIONS, OPTIONS): del EXTENSIONS['avif'] # spng build fail on 32-bit del EXTENSIONS['spng'] + else: + EXTENSIONS['avif']['libraries'].extend([ + 'SvtAv1Enc', + 'SvtAv1Dec', + ]) openjpeg_inc = subprocess.check_output( ['pkgconf', '--variable=includedir', 'libopenjp2'], @@ -39,6 +42,7 @@ def customize_build(EXTENSIONS, OPTIONS): ).strip() EXTENSIONS['jpeg2k']['include_dirs'].append(openjpeg_inc) EXTENSIONS['jpegxr']['include_dirs'].append(includedir + 'jxrlib') + EXTENSIONS['jpegxl']['libraries'] = ['jxl', 'jxl_threads'] EXTENSIONS['rcomp']['include_dirs'].append(includedir + 'cfitsio') EXTENSIONS['zopfli']['include_dirs'].append(includedir + 'zopfli') EXTENSIONS['lzham']['libraries'] = ['lzhamdll'] diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index 9f77c24..2fdd576 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +Fri Mar 24 14:31:16 UTC 2023 - Ben Greiner + +- Update to 2023.3.16 + * Pass 6884 tests. + * Require libjpeg-turbo 2.1.91 (3.0 beta) and c-blosc2 2.7.1. + * Add experimental type hints. + * Add SZIP codec via libaec library. + * Use Zstd streaming API to decode blocks with unknown + decompressed size. + * Remove unused level, index, and numthreads parameters + (breaking). + * Make AEC and BLOSC constants enums (breaking). + * Capitalize numcodecs class names (breaking). + * Remove JPEG12 codec (breaking; use JPEG8 instead). + * Encode and decode lossless and 12-bit JPEG with JPEG8 codec by + default. + * Remove JPEGSOF3 fallback in JPEG codec. + * Fix slow IFD seeking with libtiff 4.5. + * Fixes for Cython 3.0. +- Release 2023.1.23 + * Require libjxl 0.8. + * Change mapping of level to distance parameter in jpegxl_encode. + * Add option to specify bitspersample in jpegxl_encode. + * Add option to pass de/linearize tables to LJPEG codec. + * Fix lj92 decoder for SSSS=16 (#59). + * Prefer ljpeg over jpegsof3 codec. + * Add option to specify AVIF encoder codec. + * Support LERC with Zstd or Deflate compression. + * Squeeze chunk arrays by default in numcodecs image compression + codecs. +- Skip testing with dask on python 3.11: no numba yet +- Add blosc2, SVT-AV1, jpegxl (libjxl)), SZIP (libsz2) +- Disable jpeg8/libjpeg-turbo: required beta version not available + ------------------------------------------------------------------- Sat Jan 21 11:40:41 UTC 2023 - Ben Greiner diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 5a7a290..a0e09ae 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -26,7 +26,7 @@ %endif Name: python-imagecodecs%{psuffix} -Version: 2022.12.24 +Version: 2023.3.16 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause @@ -58,9 +58,9 @@ BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module blosc} BuildRequires: %{python_module czifile} -BuildRequires: %{python_module dask-array} -BuildRequires: %{python_module dask-delayed} -BuildRequires: %{python_module dask} +BuildRequires: %{python_module dask if %python-base < 3.11} +BuildRequires: %{python_module dask-array if %python-base < 3.11} +BuildRequires: %{python_module dask-delayed if %python-base < 3.11} BuildRequires: %{python_module imagecodecs >= %{version}} BuildRequires: %{python_module lz4} BuildRequires: %{python_module matplotlib >= 3.3} @@ -77,6 +77,8 @@ BuildRequires: %{python_module zstd} #BuildRequires: %%{python_module lzf} # The zopfli library is linked. User can pip install zopflipy, if needed. #BuildRequires: %%{python_module zopflipy} +# The lzfse library is linked. User can pip install pyliblzfse, if needed. +#BuildRequires: %%{python_module pyliblzfse} %else BuildRequires: CharLS-devel BuildRequires: dav1d-devel @@ -92,13 +94,17 @@ BuildRequires: lzham_codec-devel BuildRequires: pkgconfig BuildRequires: rav1e-devel BuildRequires: snappy-devel +BuildRequires: sz2-devel BuildRequires: pkgconfig(blosc) +BuildRequires: pkgconfig(blosc2) >= 2.7.1 BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(cfitsio) BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libbrotlicommon) BuildRequires: pkgconfig(libheif) -BuildRequires: pkgconfig(libjpeg) +# Beta, not available in minimum version +#BuildRequires: pkgconfig(libturbojpeg) >= 2.1.91 +BuildRequires: pkgconfig(libjxl) >= 0.8 BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libopenjp2) @@ -110,8 +116,10 @@ BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib-ng) %ifnarch %ix86 %arm # Note that upstream deprecated 32-bit as a whole -# zfp is 64 bit only. +# 64-bit only. BuildRequires: zfp-devel +BuildRequires: pkgconfig(SvtAv1Dec) +BuildRequires: pkgconfig(SvtAv1Enc) # 32-bit tests fail BuildRequires: pkgconfig(libavif) %endif @@ -139,10 +147,8 @@ dos2unix tests/test_imagecodecs.py cp %SOURCE1 ./ dos2unix README.rst # These libraries are not linked to, (check SOURCE1) -rm imagecodecs/licenses/LICENSE-blosc2 rm imagecodecs/licenses/LICENSE-brunsli rm imagecodecs/licenses/LICENSE-jetraw -rm imagecodecs/licenses/LICENSE-libjxl rm imagecodecs/licenses/LICENSE-lerc rm imagecodecs/licenses/LICENSE-mozjpeg @@ -166,12 +172,14 @@ export INCDIR="%{_includedir}" %if %{with test} # All heif tests fail because of unsupported filetypes (openSUSE does not ship patentend codec support with libheif) donttest="heif" -# no webp and lerc support in libtiff -donttest="$donttest or (test_tiff and (webp or lerc))" +# no webp and lerc support in libtiff, jpeg8 disabled in imagecodecs +donttest="$donttest or (test_tiff and (webp or lerc or jpeg))" %ifarch %ix86 %arm32 donttest="$donttest or spng" %endif -%pytest_arch -n auto tests -rsXfE --doctest-modules %{$python_sitearch}/imagecodecs/imagecodecs.py -k "not ($donttest)" +# no dask because of numba for python 3.11 +python311_donttest="or imagecodecs.imagecodecs" +%pytest_arch -n auto tests -rsXfE --doctest-modules %{$python_sitearch}/imagecodecs/imagecodecs.py -k "not ($donttest ${$python_donttest})" %endif %if !%{with test}