%global srcname imagecodecs Name: python-imagecodecs Version: 2023.1.23 Release: 3%{?dist} Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause URL: https://pypi.org/project/imagecodecs/ Source: %{pypi_source} # Build configuration Source1: imagecodecs_distributor_setup.py Patch0: python-imagecodecs-noexcept.patch ExcludeArch: %{ix86} BuildRequires: python3-devel BuildRequires: python3-Cython BuildRequires: gcc-c++ BuildRequires: blosc-devel BuildRequires: blosc2-devel BuildRequires: bzip2-devel BuildRequires: cfitsio-devel BuildRequires: CharLS-devel BuildRequires: brotli-devel BuildRequires: giflib-devel BuildRequires: jxrlib-devel BuildRequires: lcms2-devel BuildRequires: libaec-devel BuildRequires: libavif-devel BuildRequires: libdeflate-devel BuildRequires: libheif-devel BuildRequires: libjpeg-turbo-devel >= 3 BuildRequires: liblerc-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel >= 4.5.0 BuildRequires: libzstd-devel BuildRequires: lz4-devel %ifnarch s390x BuildRequires: lzfse-devel %endif # Uses 3rdparty source to use private function - https://github.com/cgohlke/imagecodecs/issues/77 #BuildRequires: openjpeg2-devel BuildRequires: snappy-devel BuildRequires: xz-devel BuildRequires: zfp-devel BuildRequires: zlib-ng-devel BuildRequires: zopfli-devel # Tests BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist blosc} BuildRequires: %{py3_dist blosc2} BuildRequires: %{py3_dist brotli} BuildRequires: %{py3_dist lz4} BuildRequires: %{py3_dist numcodecs} BuildRequires: %{py3_dist python-snappy} BuildRequires: %{py3_dist tifffile} BuildRequires: %{py3_dist zarr} BuildRequires: %{py3_dist zstd} %ifnarch s390x BuildRequires: %{py3_dist pyliblzfse} %endif %global _description %{expand: Imagecodecs is a Python library that provides block-oriented, in-memory buffer transformation, compression, and decompression functions for use in Tifffile, Czifile, Zarr, kerchunk, and other scientific image input/output packages. Decode and/or encode functions are implemented for Zlib (DEFLATE), GZIP, ZStandard (ZSTD), Blosc, Brotli, Snappy, LZMA, BZ2, LZ4, LZ4F, LZ4HC, LZW, LZF, LZFSE, LZHAM, PGLZ (PostgreSQL LZ), RCOMP (Rice), ZFP, AEC, SZIP, LERC, NPY, PNG, APNG, GIF, TIFF, WebP, QOI, JPEG 8-bit, JPEG 12-bit, Lossless JPEG (LJPEG, LJ92, JPEGLL), JPEG 2000 (JP2, J2K), JPEG LS, JPEG XL, JPEG XR (WDP, HD Photo), MOZJPEG, AVIF, HEIF, RGBE (HDR), Jetraw, PackBits, Packed Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal, Byteshuffle, Bitshuffle, CMS (color space transformations), and Float24 (24-bit floating point).} %description %_description %package -n python3-imagecodecs Summary: %{summary} %description -n python3-imagecodecs %_description %prep %autosetup -p1 -n imagecodecs-%{version} # Copy in configuration cp -a %SOURCE1 . # Force regeneration of cython source rm -f $(grep -rl '/\* Generated by Cython') # I don't want to deal with 3rdparty sources rm -r 3rdparty %generate_buildrequires # We need to import the local imagecodecs_distributor_setup.py file export PYTHONPATH=. %pyproject_buildrequires %build export CPPFLAGS=-I%{_includedir}/cfitsio # We need to import the local imagecodecs_distributor_setup.py file export PYTHONPATH=. %pyproject_wheel %install %pyproject_install %pyproject_save_files imagecodecs %check TEST_OPTS=( # TODO - tests/test_imagecodecs.py::test_cms_identity_transforms segfaults (various cases) --deselect "tests/test_imagecodecs.py::test_cms_identity_transforms" # TODO - investigate blosc2 test failues - value differences --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-0-new]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-0-bytearray]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-0-out]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-0-size]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-2-new]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-2-bytearray]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-2-out]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-2-size]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-3069-new]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-3069-bytearray]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-3069-out]" --deselect "tests/test_imagecodecs.py::test_compressors[blosc2-encode-3069-size]" # spng_encode appears to not be available with openjpeg2 disabled, but the test still tries to run --deselect tests/test_imagecodecs.py::test_spng_encode # Other deselected tests seem to be related to unsupported compression types --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-new-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-out-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgb-bytearray-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-new-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-out-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-new-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-new-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-new--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-out-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-out-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-out--1]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-bytearray-None]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-bytearray-5]" --deselect "tests/test_imagecodecs.py::test_image_roundtrips[heif-uint8-rgba-bytearray-bytearray--1]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.lerc.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.lerc.u1-True]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.tiled.lerc.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.tiled.lerc.u1-True]" --deselect "tests/test_imagecodecs.py::test_numcodecs[heif-gray]" --deselect "tests/test_imagecodecs.py::test_numcodecs[heif-rgb]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.i2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.one.f8-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgba.separate.tiled.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.f8-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.separate.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.tiled.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.u2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.f4-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.i1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.u4-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.c8-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.separate.tiled.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.separate.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgba.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.f2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.tiled.u2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.one.f4-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.series.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgba.tiled.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.i4-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgba.separate.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.tiled.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[rgb.predict.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.contig.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.one.f2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.bigendian.u2-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.bigtiff.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.stack.u1-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.c16-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.i8-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.u8-False]" --deselect "tests/test_imagecodecs.py::test_tiff_files[gray.tiled.f4-False]" --deselect "tests/test_imagecodecs.py::test_tiff_index[0]" --deselect "tests/test_imagecodecs.py::test_tiff_index[3]" --deselect "tests/test_imagecodecs.py::test_tiff_index[None]" --deselect "tests/test_imagecodecs.py::test_tiff_index[list]" --deselect "tests/test_imagecodecs.py::test_tiff_index[slice]" --deselect "tests/test_imagecodecs.py::test_tiff_asrgb" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-u1-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-u1->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-u2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-u2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-f2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-f2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-f4-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-False-f4->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-u1-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-u1->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-u2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-u2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-f2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-f2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-f4-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[deflate-True-f4->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-u1-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-u1->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-u2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-u2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-f2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-f2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-f4-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-False-f4->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-u1-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-u1->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-u2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-u2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-f2-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-f2->]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-f4-<]" --deselect "tests/test_imagecodecs.py::test_tifffile[lzma-True-f4->]" ) # A number of tests fail on s390x, ignore that for now %pytest -v "${TEST_OPTS[@]}" \ %ifarch s390x || : %endif %files -n python3-imagecodecs -f %{pyproject_files} %license LICENSE %doc README.* %{_bindir}/imagecodecs %changelog * Fri Jul 19 2024 Fedora Release Engineering - 2023.1.23-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jun 17 2024 Python Maint - 2023.1.23-2 - Rebuilt for Python 3.13 * Sun Apr 21 2024 Orion Poplawski - 2023.1.23-1 - Update to 2023.1.23 - Add more test dependencies * Sun Apr 21 2024 Zbigniew Jędrzejewski-Szmek - 2022.9.26-6 - Rebuilt for blosc2 2.14.4 * Wed Jan 31 2024 František Zatloukal - 2022.9.26-5 - Rebuilt for libavif 1.0.3 * Fri Jan 26 2024 Fedora Release Engineering - 2022.9.26-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2022.9.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 2022.9.26-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jun 02 2023 Orion Poplawski - 2022.9.26-1 - Initial Fedora package