From 3303e85a3961e0d68b2a548279e94bcd49876e46a625b5df4f6ef5e1a5f608a0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 22 Jan 2021 07:19:43 +0000 Subject: [PATCH 1/3] Accepting request 865546 from home:andythe_great update to 2021.1.11 OBS-URL: https://build.opensuse.org/request/show/865546 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=12 --- always-cythonize.patch | 12 ++++++------ imagecodecs-2020.5.30.tar.gz | 3 --- imagecodecs-2021.1.11.tar.gz | 3 +++ python-imagecodecs.changes | 24 ++++++++++++++++++++++++ python-imagecodecs.spec | 9 ++++++--- zopfli-headers.patch | 23 +++++++++++------------ 6 files changed, 50 insertions(+), 24 deletions(-) delete mode 100644 imagecodecs-2020.5.30.tar.gz create mode 100644 imagecodecs-2021.1.11.tar.gz diff --git a/always-cythonize.patch b/always-cythonize.patch index a7a03dd..f27ca82 100644 --- a/always-cythonize.patch +++ b/always-cythonize.patch @@ -1,12 +1,12 @@ -Index: imagecodecs-2020.5.30/setup.py -=================================================================== ---- imagecodecs-2020.5.30.orig/setup.py -+++ imagecodecs-2020.5.30/setup.py -@@ -71,7 +71,7 @@ if 'sdist' in sys.argv: +Index: imagecodecs-2020.5.30/setup.py +=================================================================== +--- imagecodecs-2020.5.30.orig/setup.py ++++ imagecodecs-2020.5.30/setup.py +@@ -71,7 +71,7 @@ if 'sdist' in sys.argv: OPTIONS = { -- 'cythonize': sys.version_info >= (3, 10), +- 'cythonize': sys.version_info >= (3, 10) or 'PyPy' in sys.version, + 'cythonize': True, 'include_dirs': ['imagecodecs'], 'library_dirs': [], diff --git a/imagecodecs-2020.5.30.tar.gz b/imagecodecs-2020.5.30.tar.gz deleted file mode 100644 index ac896fb..0000000 --- a/imagecodecs-2020.5.30.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8c776922d3a60824d8d3d31ba674a250d1b4d429e81349b5c88c34d4353ddb5 -size 8993252 diff --git a/imagecodecs-2021.1.11.tar.gz b/imagecodecs-2021.1.11.tar.gz new file mode 100644 index 0000000..cb2c784 --- /dev/null +++ b/imagecodecs-2021.1.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a52cf0368055dc9b1f98948deb245e2bbf23b40b74c8a03226a2d9044470754 +size 5256206 diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index 108890d..3df3d42 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Tue Jan 12 21:54:10 UTC 2021 - andy great + +- Update to version 2021.1.11. + * Fix build issues (#7, #8). + * Return bytearray instead of bytes on PyPy. + * Raise TypeError if output provided is bytes (breaking). +- Updates for version 2021.1.8 + * Add float24 codec. + * Update copyrights. +- Updates for version 2020.12.24 + * Update dependencies and build scripts. +- Updates for version 2020.12.22 + * Add AVIF codec via libavif (WIP). + * Add DEFLATE/Zlib and GZIP codecs via libdeflate. + * Add LZ4F codec. + * Add high compression mode option to lz4_encode. + * Convert JPEG XR 16 and 32-bit fixed point pixel types to float32. + * Fix JPEG 2000 lossy encoding. + * Fix GIF disposal handling. + * Remove support for Python 3.6 (NEP 29). +- Rebase always-cythonize.patch +- Rebase zopfli-headers.patch + ------------------------------------------------------------------- Fri Aug 28 09:20:47 UTC 2020 - Tomáš Chvátal diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 901e0c2..407c308 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -1,7 +1,7 @@ # # spec file for package python-imagecodecs # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,8 +26,9 @@ %bcond_with test %endif %define skip_python2 1 +%define skip_python36 1 Name: python-imagecodecs%{psuffix} -Version: 2020.5.30 +Version: 2021.1.11 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause @@ -64,6 +65,7 @@ BuildRequires: gcc-c++ BuildRequires: giflib-devel BuildRequires: jxrlib-devel BuildRequires: libaec-devel +BuildRequires: libdeflate-devel BuildRequires: libzopfli-devel BuildRequires: pkgconfig BuildRequires: python-rpm-macros @@ -135,7 +137,8 @@ mv __imagecodecs imagecodecs %license LICENSE imagecodecs/licenses/* %doc README.rst %python_alternative %{_bindir}/imagecodecs -%{python_sitearch}/* +%{python_sitearch}/imagecodecs*.egg-info +%{python_sitearch}/imagecodecs %endif %changelog diff --git a/zopfli-headers.patch b/zopfli-headers.patch index 392d4b0..08d3e27 100644 --- a/zopfli-headers.patch +++ b/zopfli-headers.patch @@ -1,13 +1,12 @@ -Index: imagecodecs-2020.5.30/imagecodecs/zopfli.pxd -=================================================================== ---- imagecodecs-2020.5.30.orig/imagecodecs/zopfli.pxd -+++ imagecodecs-2020.5.30/imagecodecs/zopfli.pxd +diff -ruN a/imagecodecs/zopfli.pxd b/imagecodecs/zopfli.pxd +--- a/imagecodecs/zopfli.pxd 2021-01-12 11:06:22.000000000 +0700 ++++ b/imagecodecs/zopfli.pxd 2021-01-13 05:00:24.579533263 +0700 @@ -4,7 +4,7 @@ - # Cython declarations for the `Zopfli 1.0.3` library. - # https://github.com/google/zopfli - --cdef extern from 'zopfli/zopfli.h': -+cdef extern from 'zopfli.h': - - ctypedef struct ZopfliOptions: - int verbose + # Cython declarations for the `Zopfli 1.0.3` library. + # https://github.com/google/zopfli + +-cdef extern from 'zopfli/zopfli.h': ++cdef extern from 'zopfli.h': + + ctypedef struct ZopfliOptions: + int verbose From 9488f3439b5250f63a04be5cccd3124e2ffe3b12b93486523d5fa9f1bcc6ef87 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 2 Feb 2021 00:09:38 +0000 Subject: [PATCH 2/3] Accepting request 868482 from home:bnavigator:branches:devel:languages:python - Update to version 2021.1.28 * Add option to return JPEG XR fixed point pixel types as integers * Add LJPEG codec via liblj92 (alternative to JPEGSOF3 codec) * Change zopfli header location. - refresh always-cythonize.patch - drop zopfli-headers.patch fixed upstream - Add more testing requirements to test backends - Add skip reporting to pytest to see what is still missing OBS-URL: https://build.opensuse.org/request/show/868482 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=13 --- always-cythonize.patch | 10 +++++----- imagecodecs-2021.1.11.tar.gz | 3 --- imagecodecs-2021.1.28.tar.gz | 3 +++ python-imagecodecs.changes | 13 +++++++++++++ python-imagecodecs.spec | 18 +++++++++++------- zopfli-headers.patch | 12 ------------ 6 files changed, 32 insertions(+), 27 deletions(-) delete mode 100644 imagecodecs-2021.1.11.tar.gz create mode 100644 imagecodecs-2021.1.28.tar.gz delete mode 100644 zopfli-headers.patch diff --git a/always-cythonize.patch b/always-cythonize.patch index f27ca82..f4be0de 100644 --- a/always-cythonize.patch +++ b/always-cythonize.patch @@ -1,8 +1,8 @@ -Index: imagecodecs-2020.5.30/setup.py -=================================================================== ---- imagecodecs-2020.5.30.orig/setup.py -+++ imagecodecs-2020.5.30/setup.py -@@ -71,7 +71,7 @@ if 'sdist' in sys.argv: +Index: imagecodecs-2021.1.28/setup.py +=================================================================== +--- imagecodecs-2021.1.28.orig/setup.py ++++ imagecodecs-2021.1.28/setup.py +@@ -105,7 +105,7 @@ def ext(**kwargs): OPTIONS = { diff --git a/imagecodecs-2021.1.11.tar.gz b/imagecodecs-2021.1.11.tar.gz deleted file mode 100644 index cb2c784..0000000 --- a/imagecodecs-2021.1.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a52cf0368055dc9b1f98948deb245e2bbf23b40b74c8a03226a2d9044470754 -size 5256206 diff --git a/imagecodecs-2021.1.28.tar.gz b/imagecodecs-2021.1.28.tar.gz new file mode 100644 index 0000000..282b199 --- /dev/null +++ b/imagecodecs-2021.1.28.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:798f478f0f6c39444961ddc7acab15c13b6bec2fb2306ba806d9dc753da7dd00 +size 9416868 diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index 3df3d42..066c6ac 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Feb 1 19:40:15 UTC 2021 - Ben Greiner + +- Update to version 2021.1.28 + * Add option to return JPEG XR fixed point pixel types as + integers + * Add LJPEG codec via liblj92 (alternative to JPEGSOF3 codec) + * Change zopfli header location. +- refresh always-cythonize.patch +- drop zopfli-headers.patch fixed upstream +- Add more testing requirements to test backends +- Add skip reporting to pytest to see what is still missing + ------------------------------------------------------------------- Tue Jan 12 21:54:10 UTC 2021 - andy great diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 407c308..a51a315 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -28,19 +28,19 @@ %define skip_python2 1 %define skip_python36 1 Name: python-imagecodecs%{psuffix} -Version: 2021.1.11 +Version: 2021.1.28 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause URL: https://www.lfd.uci.edu/~gohlke/ Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz Patch0: always-cythonize.patch -Patch1: zopfli-headers.patch BuildRequires: %{python_module Cython >= 0.29.19} BuildRequires: %{python_module numpy-devel >= 1.15.1} BuildRequires: %{python_module setuptools >= 18.0} BuildRequires: dos2unix BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-numpy >= 1.15.1 Requires(post): update-alternatives Requires(postun): update-alternatives @@ -51,15 +51,22 @@ Recommends: python-matplotlib >= 3.1 Recommends: python-tifffile >= 2020.5.25 Recommends: python-zstd %if %{with test} +BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module blosc} +BuildRequires: %{python_module czifile} BuildRequires: %{python_module imagecodecs >= %{version}} BuildRequires: %{python_module lz4} BuildRequires: %{python_module matplotlib >= 3.1} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-snappy} BuildRequires: %{python_module scikit-image} BuildRequires: %{python_module tifffile >= 2020.5.25} BuildRequires: %{python_module zstd} +# not (yet) available: +#BuildRequires: %%{python_module bitshuffle} +#BuildRequires: %%{python_module lzf} +#BuildRequires: %%{python_module zopflipy} %else BuildRequires: gcc-c++ BuildRequires: giflib-devel @@ -68,7 +75,6 @@ BuildRequires: libaec-devel BuildRequires: libdeflate-devel BuildRequires: libzopfli-devel BuildRequires: pkgconfig -BuildRequires: python-rpm-macros BuildRequires: snappy-devel BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(bzip2) @@ -119,11 +125,9 @@ export CFLAGS="%{optflags}" %check %if %{with test} -mv imagecodecs __imagecodecs # Should add --doctest-modules %%{buildroot}%%{$python_sitearch}/imagecodecs/imagecodecs.py # however doctests are currently broken -%pytest_arch tests -mv __imagecodecs imagecodecs +%pytest_arch tests -rs --import-mode append %endif %if !%{with test} @@ -137,7 +141,7 @@ mv __imagecodecs imagecodecs %license LICENSE imagecodecs/licenses/* %doc README.rst %python_alternative %{_bindir}/imagecodecs -%{python_sitearch}/imagecodecs*.egg-info +%{python_sitearch}/imagecodecs-%{version}*-info %{python_sitearch}/imagecodecs %endif diff --git a/zopfli-headers.patch b/zopfli-headers.patch deleted file mode 100644 index 08d3e27..0000000 --- a/zopfli-headers.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN a/imagecodecs/zopfli.pxd b/imagecodecs/zopfli.pxd ---- a/imagecodecs/zopfli.pxd 2021-01-12 11:06:22.000000000 +0700 -+++ b/imagecodecs/zopfli.pxd 2021-01-13 05:00:24.579533263 +0700 -@@ -4,7 +4,7 @@ - # Cython declarations for the `Zopfli 1.0.3` library. - # https://github.com/google/zopfli - --cdef extern from 'zopfli/zopfli.h': -+cdef extern from 'zopfli.h': - - ctypedef struct ZopfliOptions: - int verbose From b8f177977f98b320401ffea09c1cb1008e28282bfbffc7ea4889b42573893d5b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 11 Mar 2021 15:26:27 +0000 Subject: [PATCH 3/3] Accepting request 878211 from home:bnavigator:branches:devel:languages:python - Update to version 2021.2.26 Pass 4915 tests. Support X2 and X4 floating point predictors (found in DNG). - enable additional codecs through imagecodecs_distributor_setup.py - Add imagecodecs-pr15-test_jpegls.patch gh#cgohlke/imagecodecs#15 - disable builds for big-endian platforms as per upstream README OBS-URL: https://build.opensuse.org/request/show/878211 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=14 --- imagecodecs-2021.1.28.tar.gz | 3 --- imagecodecs-2021.2.26.tar.gz | 3 +++ imagecodecs-pr15-test_jpegls.patch | 31 ++++++++++++++++++++++++ imagecodecs_distributor_setup.py | 35 +++++++++++++++++++++++++++ python-imagecodecs.changes | 11 +++++++++ python-imagecodecs.spec | 38 +++++++++++++++++++++++------- 6 files changed, 110 insertions(+), 11 deletions(-) delete mode 100644 imagecodecs-2021.1.28.tar.gz create mode 100644 imagecodecs-2021.2.26.tar.gz create mode 100644 imagecodecs-pr15-test_jpegls.patch create mode 100644 imagecodecs_distributor_setup.py diff --git a/imagecodecs-2021.1.28.tar.gz b/imagecodecs-2021.1.28.tar.gz deleted file mode 100644 index 282b199..0000000 --- a/imagecodecs-2021.1.28.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:798f478f0f6c39444961ddc7acab15c13b6bec2fb2306ba806d9dc753da7dd00 -size 9416868 diff --git a/imagecodecs-2021.2.26.tar.gz b/imagecodecs-2021.2.26.tar.gz new file mode 100644 index 0000000..f7d485c --- /dev/null +++ b/imagecodecs-2021.2.26.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b479064983ea963b520dbd63b388f69ec8ddc4b12a8c77142d868982f17f400b +size 9419303 diff --git a/imagecodecs-pr15-test_jpegls.patch b/imagecodecs-pr15-test_jpegls.patch new file mode 100644 index 0000000..8c56181 --- /dev/null +++ b/imagecodecs-pr15-test_jpegls.patch @@ -0,0 +1,31 @@ +From b14af25da949b88fb09339fd84ac97e67aa9109f Mon Sep 17 00:00:00 2001 +From: Ben Greiner +Date: Wed, 10 Mar 2021 13:22:50 +0100 +Subject: [PATCH] Check if JPEGLS is present when testing that codec + +--- + tests/test_imagecodecs.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_imagecodecs.py b/tests/test_imagecodecs.py +index a057e15..c70a155 100644 +--- a/tests/test_imagecodecs.py ++++ b/tests/test_imagecodecs.py +@@ -1535,7 +1535,7 @@ def test_jpeg2k_ycbc(): + assert tuple(decoded[-1, -1]) == (0, 0, 0) + + +-@pytest.mark.skipif(not imagecodecs.JPEGXL, reason='jpegls missing') ++@pytest.mark.skipif(not imagecodecs.JPEGLS, reason='jpegls missing') + @pytest.mark.parametrize('output', ['new', 'out', 'bytearray']) + def test_jpegls_decode(output): + """Test JPEG LS decoder with RGBA32 image.""" +@@ -1889,7 +1889,7 @@ def encode(data, *args, **kwargs): + ) + + elif codec == 'jpegls': +- if not imagecodecs.JPEGXL: ++ if not imagecodecs.JPEGLS: + pytest.skip(f'{codec} missing') + if itype in ('view', 'graya') or deout == 'view': + pytest.xfail('jpegls does not support this case') diff --git a/imagecodecs_distributor_setup.py b/imagecodecs_distributor_setup.py new file mode 100644 index 0000000..ade1d83 --- /dev/null +++ b/imagecodecs_distributor_setup.py @@ -0,0 +1,35 @@ +# openSUSE extension setup to build python-imagecodecs + +import os +import subprocess +import sys + +def customize_build(EXTENSIONS, OPTIONS): + + includedir = os.getenv("INCDIR",'') + '/' + + del EXTENSIONS['jpeg12'] # jpeg12 requires custom build + del EXTENSIONS['lerc'] # LERC library not available + del EXTENSIONS['lz4f'] # requires static linking + del EXTENSIONS['jpegxl'] # Brunsli library not available + + EXTENSIONS['avif']['libraries'] = [ + 'avif', + 'aom', + 'dav1d', + 'rav1e', + ] + + # no zfp on 32-bit platforms + if sys.maxsize < 2**63 - 1: + del EXTENSIONS['zfp'] + + + openjpeg_inc = subprocess.check_output( + ['pkgconf', '--variable=includedir', 'libopenjp2'], + text=True, + ).strip() + EXTENSIONS['jpeg2k']['include_dirs'].append(openjpeg_inc) + + EXTENSIONS['jpegxr']['include_dirs'].append(includedir + 'jxrlib') + EXTENSIONS['zopfli']['include_dirs'].append(includedir + 'zopfli') diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index 066c6ac..17bdc67 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 10 10:42:55 UTC 2021 - Ben Greiner + +- Update to version 2021.2.26 + Pass 4915 tests. Support X2 and X4 floating point predictors + (found in DNG). +- enable additional codecs through imagecodecs_distributor_setup.py +- Add imagecodecs-pr15-test_jpegls.patch + gh#cgohlke/imagecodecs#15 +- disable builds for big-endian platforms as per upstream README + ------------------------------------------------------------------- Mon Feb 1 19:40:15 UTC 2021 - Ben Greiner diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index a51a315..d5faf1d 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -28,13 +28,16 @@ %define skip_python2 1 %define skip_python36 1 Name: python-imagecodecs%{psuffix} -Version: 2021.1.28 +Version: 2021.2.26 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause -URL: https://www.lfd.uci.edu/~gohlke/ +URL: https://github.com/cgohlke/imagecodecs/ Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz +Source1: imagecodecs_distributor_setup.py Patch0: always-cythonize.patch +# PATCH-FIX-UPSTREAM imagecodecs-pr15-test_jpegls.patch -- gh#cgohlke/imagecodecs#15 +Patch1: https://github.com/cgohlke/imagecodecs/pull/15.patch#/imagecodecs-pr15-test_jpegls.patch BuildRequires: %{python_module Cython >= 0.29.19} BuildRequires: %{python_module numpy-devel >= 1.15.1} BuildRequires: %{python_module setuptools >= 18.0} @@ -63,22 +66,28 @@ BuildRequires: %{python_module python-snappy} BuildRequires: %{python_module scikit-image} BuildRequires: %{python_module tifffile >= 2020.5.25} BuildRequires: %{python_module zstd} -# not (yet) available: +# libraries and python modules not (yet) available: #BuildRequires: %%{python_module bitshuffle} #BuildRequires: %%{python_module lzf} +# The zopfli library is linked. User can pip install zopflipy, if needed. #BuildRequires: %%{python_module zopflipy} %else +BuildRequires: CharLS-devel +BuildRequires: dav1d-devel BuildRequires: gcc-c++ BuildRequires: giflib-devel BuildRequires: jxrlib-devel BuildRequires: libaec-devel +BuildRequires: libaom-devel BuildRequires: libdeflate-devel BuildRequires: libzopfli-devel BuildRequires: pkgconfig +BuildRequires: rav1e-devel BuildRequires: snappy-devel BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libavif) BuildRequires: pkgconfig(libbrotlicommon) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(liblz4) @@ -89,7 +98,13 @@ BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(zlib) +%ifnarch %ix86 %arm +# zfp is 64 bit only. Note that upstream deprecated 32-bit as a whole +BuildRequires: zfp-devel %endif +%endif +# Upstream: big endian is not supported +ExcludeArch: s390x ppc64 %python_subpackages %description @@ -97,20 +112,27 @@ Imagecodecs is a Python library that provides block-oriented, in-memory buffer transformation, compression, and decompression functions for use in the tifffile, czifile, and other scientific imaging modules. -Decode and/or encode functions are currently implemented for Zlib DEFLATE, -ZStandard, Blosc, LZMA, BZ2, LZ4, LZW, LZF, ZFP, NPY, PNG, WebP, JPEG 8-bit, -JPEG 12-bit, JPEG SOF3, JPEG LS, JPEG 2000, JPEG XR, PackBits, Packed Integers, -Delta, XOR Delta, Floating Point Predictor, and Bitorder reversal. +Decode and/or encode functions are implemented for Zlib (DEFLATE), GZIP, +ZStandard (ZSTD), Blosc, Brotli, Snappy, LZMA, BZ2, LZ4, LZ4F, LZ4HC, LZW, LZF, +ZFP, AEC, LERC, NPY, PNG, GIF, TIFF, WebP, JPEG 8-bit, JPEG 12-bit, Lossless +JPEG (LJPEG, SOF3), JPEG 2000, JPEG LS, JPEG XR, JPEG XL, AVIF, PackBits, Packed +Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal, +Bitshuffle, and Float24 (24-bit floating point). %prep %setup -q -n imagecodecs-%{version} +# the patch from github requires unix line endings to apply +dos2unix tests/test_imagecodecs.py %autopatch -p1 - +cp %SOURCE1 ./ dos2unix README.rst +# https://github.com/cgohlke/imagecodecs/pull/15#issuecomment-795744838 +ldd %{_libdir}/libblosc.so.1 | grep -q libsnappy && sed -i "s/if not IS_CG and compressor == 'snappy'/if False/" tests/test_imagecodecs.py %build %if !%{with test} export CFLAGS="%{optflags}" +export INCDIR="%{_includedir}" %python_build %endif