diff --git a/imagecodecs-2024.1.1.tar.gz b/imagecodecs-2024.1.1.tar.gz deleted file mode 100644 index 5e3e4a4..0000000 --- a/imagecodecs-2024.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fde46bd698d008255deef5411c59b35c0e875295e835bf6079f7e2ab22f216eb -size 9452821 diff --git a/imagecodecs-2024.6.1.tar.gz b/imagecodecs-2024.6.1.tar.gz new file mode 100644 index 0000000..5ecc885 --- /dev/null +++ b/imagecodecs-2024.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f3e94b7f51e2f78287b7ffae82cd850b1007639148894538274fa50bd179886 +size 9459867 diff --git a/imagecodecs_distributor_setup.py b/imagecodecs_distributor_setup.py new file mode 100644 index 0000000..732f442 --- /dev/null +++ b/imagecodecs_distributor_setup.py @@ -0,0 +1,40 @@ +# openSUSE extension setup to build python-imagecodecs + +import os +import subprocess +import sys + +def customize_build(EXTENSIONS, OPTIONS): + + print(f"Building with custom OpenSUSE config ({__file__})") + + includedir = os.getenv("INCDIR",'') + '/' + + del EXTENSIONS['apng'] # png-apng library not available + del EXTENSIONS['brunsli'] # graphics/brunsli not in Factory + del EXTENSIONS['jetraw'] # jetraw library not available + del EXTENSIONS['lerc'] # LERC library not available + del EXTENSIONS['lz4f'] # requires static linking + del EXTENSIONS['lzo'] # lzokay not available + del EXTENSIONS['mozjpeg'] # Win32 only + del EXTENSIONS['pcodec'] # not available in Factory + del EXTENSIONS['sperr'] # not available in Factory + + EXTENSIONS['avif']['libraries'] = [ + 'avif', + 'aom', + 'dav1d', + 'rav1e', + 'sharpyuv', + 'SvtAv1Enc', + ] + 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['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 a5ecda1..85dcc25 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Jul 17 08:39:26 UTC 2024 - Ben Greiner + +- Update to 2024.6.1 + * Pass 7486 tests. + * Fix segfault in sperr_decode. + * Fix segfault when strided-decoding into buffers with unexpected + shapes (#98). + * Fix jpeg2k_encoder output buffer too small (#101). + * Add PCODEC codec based on pcodec library. + * Support NumPy 2. +- Drop skip-rare-codecs.patch, restore and update + imagecodecs_distributor_setup.py + ------------------------------------------------------------------- Mon Mar 18 19:45:10 UTC 2024 - Dirk Müller diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 05012fd..b684e27 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -26,13 +26,13 @@ %endif Name: python-imagecodecs%{psuffix} -Version: 2024.1.1 +Version: 2024.6.1 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause URL: https://github.com/cgohlke/imagecodecs/ -Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz -Patch1: skip-rare-codecs.patch +Source0: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz +Source1: imagecodecs_distributor_setup.py ExcludeArch: %ix86 %arm32 ppc s390 BuildRequires: %{python_module Cython >= 3} BuildRequires: %{python_module base >= 3.8} @@ -61,7 +61,7 @@ BuildRequires: %{python_module czifile} BuildRequires: %{python_module dask-array} BuildRequires: %{python_module dask-delayed} BuildRequires: %{python_module dask} -BuildRequires: %{python_module imagecodecs >= %{version}} +BuildRequires: %{python_module imagecodecs = %{version}} BuildRequires: %{python_module lz4} BuildRequires: %{python_module matplotlib >= 3.3} BuildRequires: %{python_module numcodecs} @@ -96,6 +96,7 @@ BuildRequires: rav1e-devel BuildRequires: snappy-devel BuildRequires: sz2-devel BuildRequires: xz-devel +BuildRequires: zfp-devel BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(blosc2) >= 2.7.1 BuildRequires: pkgconfig(bzip2) @@ -104,25 +105,20 @@ BuildRequires: pkgconfig(lcms2) >= 2.16 BuildRequires: pkgconfig(libavif) >= 1.0.0 BuildRequires: pkgconfig(libbrotlicommon) BuildRequires: pkgconfig(libheif) -# Beta, not available in minimum version -#BuildRequires: pkgconfig(libturbojpeg) >= 2.1.91 +# Tests fail if enabled +# BuildRequires: pkgconfig(libturbojpeg) BuildRequires: pkgconfig(libjxl) >= 0.9 +BuildRequires: pkgconfig(SvtAv1Enc) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libopenjp2) BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libsharpyuv) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib-ng) -%ifnarch %ix86 %arm -# Note that upstream deprecated 32-bit as a whole -# 64-bit only. -BuildRequires: zfp-devel -BuildRequires: pkgconfig(SvtAv1Dec) -BuildRequires: pkgconfig(SvtAv1Enc) -%endif %endif %python_subpackages @@ -140,17 +136,23 @@ Bitshuffle, and Float24 (24-bit floating point). %prep %autosetup -p1 -n imagecodecs-%{version} +cp %{SOURCE1} ./ dos2unix README.rst # These libraries are not linked to, (check SOURCE1) rm imagecodecs/licenses/LICENSE-brunsli rm imagecodecs/licenses/LICENSE-jetraw rm imagecodecs/licenses/LICENSE-lerc +rm imagecodecs/licenses/LICENSE-lzokay rm imagecodecs/licenses/LICENSE-mozjpeg +rm imagecodecs/licenses/LICENSE-pcodec +rm imagecodecs/licenses/LICENSE-sperr %build %if !%{with test} export CFLAGS="%{optflags}" export INCDIR="%{_includedir}" +# make sure we can import Source1 +export PYTHONPATH=$PWD:$PYTHONPATH %pyproject_wheel %endif @@ -167,12 +169,9 @@ 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, jpeg8 disabled in imagecodecs -donttest="$donttest or (test_tiff and (webp or lerc or jpeg))" +# no webp and lerc support in libtiff +donttest="$donttest or (test_tiff and (webp or lerc))" donttest+=" or test_cms" -%ifarch %ix86 %arm32 -donttest="$donttest or spng" -%endif %pytest_arch -n auto tests -rsXfE -k "not ($donttest ${$python_donttest})" %endif diff --git a/skip-rare-codecs.patch b/skip-rare-codecs.patch deleted file mode 100644 index c10c2b2..0000000 --- a/skip-rare-codecs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- imagecodecs-2024.1.1.orig/setup.py -+++ imagecodecs-2024.1.1/setup.py -@@ -246,7 +246,7 @@ def customize_build_default(EXTENSIONS, - del EXTENSIONS['sperr'] # sperr not commonly available - del EXTENSIONS['zlibng'] # zlib-ng library not commonly available - -- if 'arch' not in platform.platform(): -+ if True: - del EXTENSIONS['jpegls'] # CharLS 2.1 library not commonly available - del EXTENSIONS['jpegxl'] # jpeg-xl library not commonly available - del EXTENSIONS['brunsli'] # Brunsli library not commonly available