Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-imagecodecs for 
openSUSE:Factory checked in at 2023-09-13 20:45:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-imagecodecs (Old)
 and      /work/SRC/openSUSE:Factory/.python-imagecodecs.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-imagecodecs"

Wed Sep 13 20:45:40 2023 rev:11 rq:1110836 version:2023.3.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-imagecodecs/python-imagecodecs.changes    
2023-03-27 18:15:39.662910558 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-imagecodecs.new.1766/python-imagecodecs.changes
  2023-09-13 20:47:55.353261085 +0200
@@ -1,0 +2,5 @@
+Tue Sep 12 14:21:29 UTC 2023 - Markéta Machová <mmach...@suse.com>
+
+- Add patch cython3.patch to fix build
+
+-------------------------------------------------------------------

New:
----
  cython3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-imagecodecs.spec ++++++
--- /var/tmp/diff_new_pack.eQFs7y/_old  2023-09-13 20:47:56.601305607 +0200
+++ /var/tmp/diff_new_pack.eQFs7y/_new  2023-09-13 20:47:56.601305607 +0200
@@ -34,6 +34,8 @@
 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 
https://github.com/cgohlke/imagecodecs/commit/14bb6012a8c9f48df264ea996f3376e57166201a
 Update imagecodecs/_heif.pyx
+Patch1:         cython3.patch
 BuildRequires:  %{python_module Cython >= 0.29.19}
 BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module numpy-devel}

++++++ cython3.patch ++++++
>From 14bb6012a8c9f48df264ea996f3376e57166201a Mon Sep 17 00:00:00 2001
From: Christoph Gohlke <cgoh...@cgohlke.com>
Date: Mon, 3 Jul 2023 09:41:26 -0700
Subject: [PATCH] Update imagecodecs/_heif.pyx

---
 imagecodecs/_heif.pyx | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

Index: imagecodecs-2023.3.16/imagecodecs/_heif.pyx
===================================================================
--- imagecodecs-2023.3.16.orig/imagecodecs/_heif.pyx
+++ imagecodecs-2023.3.16/imagecodecs/_heif.pyx
@@ -61,9 +61,9 @@ class HEIF:
         AVC = heif_compression_AVC
         JPEG = heif_compression_JPEG
         AV1 = heif_compression_AV1
-        # VVC = heif_compression_VVC
-        # EVC = heif_compression_EVC
-        # JPEG2000 = heif_compression_JPEG2000
+        VVC = heif_compression_VVC
+        EVC = heif_compression_EVC
+        JPEG2000 = heif_compression_JPEG2000
 
     class COLORSPACE(enum.IntEnum):
         """HEIF codec color spaces."""
@@ -145,13 +145,13 @@ def heif_encode(
         uint16_t* a2ptr = NULL
 
     if not (
-        src.dtype in (numpy.uint8, numpy.uint16)
+        src.dtype in {numpy.uint8, numpy.uint16}
         # and numpy.PyArray_ISCONTIGUOUS(src)
-        and src.ndim in (2, 3, 4)
-        and src.shape[0] < 2 ** 32
-        and src.shape[1] < 2 ** 32
-        and src.shape[src.ndim - 1] < 2 ** 32
-        and src.shape[src.ndim - 2] < 2 ** 32
+        and src.ndim in {2, 3, 4}
+        and src.shape[0] < 4294967296
+        and src.shape[1] < 4294967296
+        and src.shape[src.ndim - 1] < 4294967296
+        and src.shape[src.ndim - 2] < 4294967296
     ):
         raise ValueError('invalid data shape, strides, or dtype')
 
@@ -184,14 +184,14 @@ def heif_encode(
         raise ValueError(f'{src.ndim} dimensions not supported')
 
     monochrome = samples < 3
-    hasalpha = samples in (2, 4)
+    hasalpha = samples in {2, 4}
 
     if bitspersample is None:
         depth = 8 if itemsize == 1 else 10
     else:
         depth = bitspersample
         if (
-            depth not in (8, 10, 12)
+            depth not in {8, 10, 12}
             or (depth == 8 and itemsize == 2)
             or (depth > 8 and itemsize == 1)
         ):
@@ -721,12 +721,12 @@ cdef _heif_photometric(photometric):
     """Return heif_colorspace value from photometric argument."""
     if photometric is None:
         return heif_colorspace_undefined
-    if photometric in (
+    if photometric in {
         heif_colorspace_undefined,
         heif_colorspace_YCbCr,
         heif_colorspace_RGB,
         heif_colorspace_monochrome,
-    ):
+    }:
         return photometric
     if isinstance(photometric, str):
         photometric = photometric.upper()
@@ -734,9 +734,9 @@ cdef _heif_photometric(photometric):
             return heif_colorspace_RGB
         if photometric[:3] == 'YCBCR':
             return heif_colorspace_YCbCr
-        if photometric in (
+        if photometric in {
             'GRAY', 'BLACKISZERO', 'MINISBLACK', 'WHITEISZERO', 'MINISWHITE'
-        ):
+        }:
             return heif_colorspace_monochrome
     raise ValueError(f'photometric {photometric!r} not supported')
 
@@ -745,7 +745,7 @@ cdef _heif_compression(compression):
     """Return heif_compression_format value from compression argument."""
     if compression is None:
         return heif_compression_HEVC
-    if compression in (
+    if compression in {
         heif_compression_undefined,
         heif_compression_HEVC,
         heif_compression_AVC,
@@ -754,7 +754,7 @@ cdef _heif_compression(compression):
         # heif_compression_VVC,
         # heif_compression_EVC,
         # heif_compression_JPEG2000,
-    ):
+    }:
         return compression
     if isinstance(compression, str):
         compression = compression.upper()
@@ -782,7 +782,7 @@ cdef heif_error heif_write_callback(
     const void* data,
     size_t size,
     void* userdata
-) nogil:
+) noexcept nogil:
     """heif_writer callback function."""
     cdef:
         output_t* output = <output_t*> userdata

Reply via email to