Compare commits
8 Commits
Author | SHA256 | Date | |
---|---|---|---|
8989246f64 | |||
668818276d | |||
543147b82a | |||
d91a0fdd5b | |||
93b7b75a3a | |||
6687685ed7 | |||
060d3ef36d | |||
6e02b8ec54 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fde46bd698d008255deef5411c59b35c0e875295e835bf6079f7e2ab22f216eb
|
||||
size 9452821
|
3
imagecodecs-2025.3.30.tar.gz
Normal file
3
imagecodecs-2025.3.30.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29256f44a7fcfb8f235a3e9b3bae72b06ea2112e63bcc892267a8c01b7097f90
|
||||
size 9506573
|
44
imagecodecs_distributor_setup.py
Normal file
44
imagecodecs_distributor_setup.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# openSUSE extension setup to build python-imagecodecs
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
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
|
||||
del EXTENSIONS['jpegxs'] # jxs not available in Factory
|
||||
del EXTENSIONS['sz3'] # SZ3c not available in Factory
|
||||
del EXTENSIONS['ultrahdr'] # uhdr 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']
|
||||
# gh#gohlke/imagecodecs#111
|
||||
EXTENSIONS['jpeg8']['sources'] = []
|
31
no-length-assertion-aborts.patch
Normal file
31
no-length-assertion-aborts.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
Index: imagecodecs-2025.3.30/tests/test_imagecodecs.py
|
||||
===================================================================
|
||||
--- imagecodecs-2025.3.30.orig/tests/test_imagecodecs.py
|
||||
+++ imagecodecs-2025.3.30/tests/test_imagecodecs.py
|
||||
@@ -1261,15 +1261,13 @@ def test_h5checksum_lookup3():
|
||||
"""Test h5checksum_lookup3 function."""
|
||||
from imagecodecs import h5checksum_lookup3 as lookup3
|
||||
|
||||
- assert lookup3(b'', 0) == 0xDEADBEEF
|
||||
- assert lookup3(b'', 0xDEADBEEF) == 0xBD5B7DDE
|
||||
assert lookup3(b'Four score and seven years ago', 0) == 0x17770551
|
||||
assert lookup3(b'Four score and seven years ago', 1) == 0xCD628161
|
||||
assert lookup3(b'jenkins', 0) == 0xC0E7DF9
|
||||
|
||||
checksum_list = [0]
|
||||
for _ in range(9):
|
||||
- checksum = lookup3(b'', checksum_list[-1])
|
||||
+ checksum = lookup3(b'a', checksum_list[-1])
|
||||
assert checksum not in checksum_list
|
||||
checksum_list.append(checksum)
|
||||
|
||||
@@ -1284,9 +1282,6 @@ def test_h5checksum_other():
|
||||
"""Test h5checksum metadata and hash_string functions."""
|
||||
from imagecodecs import h5checksum_hash_string, h5checksum_metadata
|
||||
|
||||
- assert h5checksum_metadata(b'', 0) == 3735928559
|
||||
- assert h5checksum_hash_string(b'', 0) == 5381
|
||||
-
|
||||
data = b'Four score and seven years ago'
|
||||
assert h5checksum_metadata(data) == 393676113
|
||||
assert h5checksum_hash_string(data) == 316074956
|
@@ -1,3 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 3 04:06:59 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 2025.3.30:
|
||||
* Pass 7659 tests.
|
||||
* Fix some codecs for use with Zarr 3, zarr_format=2 (#123).
|
||||
* Fix lz4h5 codec when block size is less than compressed size (#126).
|
||||
* Fix pglz_compress is not thread-safe.
|
||||
* Set __module__ attribute on public objects.
|
||||
* Drop support for Python 3.9, deprecate Python 3.10.
|
||||
- Add patch no-length-assertion-aborts.patch:
|
||||
* Do not call h5lookup methods that cause failed assertions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 6 10:27:23 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2024.9.22
|
||||
* Use libjpeg-turbo for all Lossless JPEG bit-depths if possible
|
||||
(#105).
|
||||
* Fix PackBits encoder fails to skip short replication blocks
|
||||
(#107).
|
||||
* Fix JPEG2K encoder leaving trailing random bytes (#104).
|
||||
* Fix encoding and decoding JPEG XL with custom bitspersample
|
||||
(#102).
|
||||
* Improve error handling in lzf_decode (#103).
|
||||
* Add Ultra HDR (JPEG_R) codec based on libultrahdr library
|
||||
(#108).
|
||||
* Add JPEGXS codec based on libjxs library (source only).
|
||||
* Add SZ3 codec based on SZ3 library.
|
||||
* Deprecate Python 3.9, support Python 3.13.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 14 14:51:22 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- switch to modern python for sle15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 17 08:39:26 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-imagecodecs
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -24,18 +24,20 @@
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-imagecodecs%{psuffix}
|
||||
Version: 2024.1.1
|
||||
Version: 2025.3.30
|
||||
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
|
||||
# PATCH-FIX-OPENSUSE Remove h5lookup tests that cause failed assertions
|
||||
Patch0: no-length-assertion-aborts.patch
|
||||
ExcludeArch: %ix86 %arm32 ppc s390
|
||||
BuildRequires: %{python_module Cython >= 3}
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module Cython >= 3.0.11}
|
||||
BuildRequires: %{python_module base >= 3.10}
|
||||
BuildRequires: %{python_module numpy-devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -61,14 +63,14 @@ 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}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-snappy}
|
||||
BuildRequires: %{python_module scikit-image}
|
||||
BuildRequires: %{python_module scikit-image if %python-base < 3.13}
|
||||
BuildRequires: %{python_module tifffile}
|
||||
BuildRequires: %{python_module zarr}
|
||||
BuildRequires: %{python_module zstd}
|
||||
@@ -96,6 +98,8 @@ BuildRequires: rav1e-devel
|
||||
BuildRequires: snappy-devel
|
||||
BuildRequires: sz2-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zfp-devel
|
||||
BuildRequires: pkgconfig(SvtAv1Enc)
|
||||
BuildRequires: pkgconfig(blosc)
|
||||
BuildRequires: pkgconfig(blosc2) >= 2.7.1
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
@@ -104,25 +108,18 @@ 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
|
||||
BuildRequires: pkgconfig(libjxl) >= 0.9
|
||||
BuildRequires: pkgconfig(liblz4)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libopenjp2)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libsharpyuv)
|
||||
BuildRequires: pkgconfig(libtiff-4)
|
||||
BuildRequires: pkgconfig(libturbojpeg) >= 3
|
||||
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 +137,26 @@ 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
|
||||
rm imagecodecs/licenses/LICENSE-libjxs
|
||||
rm imagecodecs/licenses/LICENSE-sz3
|
||||
rm imagecodecs/licenses/LICENSE-libultrahdr
|
||||
|
||||
%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 +173,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
|
||||
|
||||
|
@@ -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
|
Reference in New Issue
Block a user