Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyssim for openSUSE:Factory 
checked in at 2025-02-06 22:07:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyssim (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyssim.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyssim"

Thu Feb  6 22:07:58 2025 rev:6 rq:1243538 version:0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyssim/python-pyssim.changes      
2023-10-06 21:16:44.340831573 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyssim.new.2316/python-pyssim.changes    
2025-02-06 22:09:07.171250503 +0100
@@ -1,0 +2,12 @@
+Thu Feb  6 03:38:31 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Update to 0.7:
+  * Drop Python 3.7 support.
+  * Add Python 3.12 support.
+  * Update support for newer versions of PIL/Pillow.
+- Drop patch pillow10.patch, included upstream.
+- Add patch use-pywavelets.patch:
+  * Use PyWavelets rather scipy.signal for CWT.
+- Switch to pyproject macros.
+
+-------------------------------------------------------------------

Old:
----
  pillow10.patch
  pyssim-0.6.tar.gz

New:
----
  pyssim-0.7.tar.gz
  use-pywavelets.patch

BETA DEBUG BEGIN:
  Old:  * Update support for newer versions of PIL/Pillow.
- Drop patch pillow10.patch, included upstream.
- Add patch use-pywavelets.patch:
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:- Drop patch pillow10.patch, included upstream.
- Add patch use-pywavelets.patch:
  * Use PyWavelets rather scipy.signal for CWT.
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-pyssim.spec ++++++
--- /var/tmp/diff_new_pack.SkN9Kw/_old  2025-02-06 22:09:08.283296327 +0100
+++ /var/tmp/diff_new_pack.SkN9Kw/_new  2025-02-06 22:09:08.287296492 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyssim
 #
-# Copyright (c) 2023 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
@@ -16,29 +16,31 @@
 #
 
 
-%global skip_python36 1
 Name:           python-pyssim
-Version:        0.6
+Version:        0.7
 Release:        0
 Summary:        Structured Similarity Image Metric (SSIM)
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/jterrace/pyssim
 Source:         
https://files.pythonhosted.org/packages/source/p/pyssim/pyssim-%{version}.tar.gz
 Patch0:         Pillow-imports.patch
-# PATCH-FIX-UPSTREAM 
https://github.com/jterrace/pyssim/commit/db4296c12ca9c027eb9cd61b52195a78dfcc6711
 Replace Image.ANTIALIAS with Image.LANCZOS
-Patch1:         pillow10.patch
+# PATCH-FIX-UPSTREAM Use PyWavelets rather than scipy.signal 
gh#jterrace/pyssim#49
+Patch1:         use-pywavelets.patch
+BuildRequires:  %{python_module base >= 3.8}
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-Pillow
+Requires:       python-PyWavelets
 Requires:       python-numpy
 Requires:       python-scipy
 Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Pillow}
+BuildRequires:  %{python_module PyWavelets}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module scipy}
 # /SECTION
@@ -51,10 +53,10 @@
 %autosetup -p1 -n pyssim-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/pyssim
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
@@ -78,5 +80,5 @@
 %doc README.md
 %python_alternative %{_bindir}/pyssim
 %{python_sitelib}/ssim
-%{python_sitelib}/pyssim-%{version}*-info
+%{python_sitelib}/pyssim-%{version}.dist-info
 

++++++ pyssim-0.6.tar.gz -> pyssim-0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/CHANGES.md new/pyssim-0.7/CHANGES.md
--- old/pyssim-0.6/CHANGES.md   2023-03-19 18:34:13.000000000 +0100
+++ new/pyssim-0.7/CHANGES.md   2023-10-21 18:20:08.000000000 +0200
@@ -1,5 +1,11 @@
 # Changelog
 
+## 0.7
+
+* Drop Python 3.7 support.
+* Add Python 3.12 support.
+* Update support for newer versions of PIL/Pillow.
+
 ## 0.6
 
 * Update supported python versions to 3.7 through 3.11.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/PKG-INFO new/pyssim-0.7/PKG-INFO
--- old/pyssim-0.6/PKG-INFO     2023-03-19 20:43:37.784897800 +0100
+++ new/pyssim-0.7/PKG-INFO     2023-10-21 18:53:54.042653000 +0200
@@ -1,10 +1,11 @@
-Metadata-Version: 1.0
+Metadata-Version: 2.1
 Name: pyssim
-Version: 0.6
+Version: 0.7
 Summary: Module for computing Structured Similarity Image Metric (SSIM) in 
Python
 Home-page: https://github.com/jterrace/pyssim
 Author: Antoine Vacavant, Christopher Godfrey, Jeff Terrace
 Author-email: jterr...@gmail.com
 License: MIT License
-Description: UNKNOWN
 Platform: any
+License-File: LICENSE.md
+License-File: AUTHORS.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/SSIM_CW-SSIM_comparison.ipynb 
new/pyssim-0.7/SSIM_CW-SSIM_comparison.ipynb
--- old/pyssim-0.6/SSIM_CW-SSIM_comparison.ipynb        2023-03-19 
17:44:55.000000000 +0100
+++ new/pyssim-0.7/SSIM_CW-SSIM_comparison.ipynb        2023-10-21 
18:16:41.000000000 +0200
@@ -34,19 +34,19 @@
     "size = (256,256)\n",
     "\n",
     "im = Image.open('test-images/test3-orig.jpg')\n",
-    "im = im.resize(size, Image.ANTIALIAS)\n",
+    "im = im.resize(size, Image.LANCZOS)\n",
     "\n",
     "# slightly rotated image\n",
     "im_rot = Image.open('test-images/test3-rot.jpg')\n",
-    "im_rot = im_rot.resize(size, Image.ANTIALIAS)\n",
+    "im_rot = im_rot.resize(size, Image.LANCZOS)\n",
     "\n",
     "# slightly modified lighting conditions\n",
     "im_lig = Image.open('test-images/test3-lig.jpg')\n",
-    "im_lig = im_lig.resize(size, Image.ANTIALIAS)\n",
+    "im_lig = im_lig.resize(size, Image.LANCZOS)\n",
     "\n",
     "# image cropped\n",
     "im_cro = Image.open('test-images/test3-cro.jpg')\n",
-    "im_cro = im_cro.resize(size, Image.ANTIALIAS)"
+    "im_cro = im_cro.resize(size, Image.LANCZOS)"
    ]
   },
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/pyssim.egg-info/PKG-INFO 
new/pyssim-0.7/pyssim.egg-info/PKG-INFO
--- old/pyssim-0.6/pyssim.egg-info/PKG-INFO     2023-03-19 20:43:37.000000000 
+0100
+++ new/pyssim-0.7/pyssim.egg-info/PKG-INFO     2023-10-21 18:53:53.000000000 
+0200
@@ -1,10 +1,11 @@
-Metadata-Version: 1.0
+Metadata-Version: 2.1
 Name: pyssim
-Version: 0.6
+Version: 0.7
 Summary: Module for computing Structured Similarity Image Metric (SSIM) in 
Python
 Home-page: https://github.com/jterrace/pyssim
 Author: Antoine Vacavant, Christopher Godfrey, Jeff Terrace
 Author-email: jterr...@gmail.com
 License: MIT License
-Description: UNKNOWN
 Platform: any
+License-File: LICENSE.md
+License-File: AUTHORS.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/pyssim.egg-info/entry_points.txt 
new/pyssim-0.7/pyssim.egg-info/entry_points.txt
--- old/pyssim-0.6/pyssim.egg-info/entry_points.txt     2023-03-19 
20:43:37.000000000 +0100
+++ new/pyssim-0.7/pyssim.egg-info/entry_points.txt     2023-10-21 
18:53:53.000000000 +0200
@@ -1,3 +1,2 @@
 [console_scripts]
 pyssim = ssim.__main__:main
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/setup.py new/pyssim-0.7/setup.py
--- old/pyssim-0.6/setup.py     2023-03-19 20:38:34.000000000 +0100
+++ new/pyssim-0.7/setup.py     2023-10-21 18:47:51.000000000 +0200
@@ -5,7 +5,7 @@
 
 setup(
     name='pyssim',
-    version='0.6',
+    version='0.7',
     description=('Module for computing Structured Similarity Image Metric '
                  '(SSIM) in Python'),
     author='Antoine Vacavant, Christopher Godfrey, Jeff Terrace',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/ssim/__init__.py 
new/pyssim-0.7/ssim/__init__.py
--- old/pyssim-0.6/ssim/__init__.py     2023-03-19 17:44:55.000000000 +0100
+++ new/pyssim-0.7/ssim/__init__.py     2023-10-21 18:16:41.000000000 +0200
@@ -16,7 +16,7 @@
       im2: Second PIL Image object to compare.
 
     Returns:
-      SSIM float value.
+      SSIM float value, in the range (-1, 1).
     """
     gaussian_kernel_1d = get_gaussian_kernel(
         gaussian_kernel_width, gaussian_kernel_sigma)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyssim-0.6/ssim/ssimlib.py 
new/pyssim-0.7/ssim/ssimlib.py
--- old/pyssim-0.6/ssim/ssimlib.py      2023-03-19 17:44:55.000000000 +0100
+++ new/pyssim-0.7/ssim/ssimlib.py      2023-10-21 18:16:41.000000000 +0200
@@ -45,7 +45,7 @@
         # Resize image if size is defined and different
         # from original image
         if size and size != self.img.size:
-            self.img = self.img.resize(size, Image.ANTIALIAS)
+            self.img = self.img.resize(size, Image.LANCZOS)
 
         # Set the size of the image
         self.size = self.img.size

++++++ use-pywavelets.patch ++++++
>From 64a58687f261eb397e9c22609b5d48497ef02762 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <ste...@wedontsleep.org>
Date: Thu, 6 Feb 2025 14:23:17 +1100
Subject: [PATCH] Use PyWavelets for continuous wavelet transform

scipy 1.15.0 has been released, and with it, signal.cwt has been
removed[1]. The suggested recommendation is to use PyWavelets.

1: 
https://docs.scipy.org/doc/scipy-1.12.0/reference/generated/scipy.signal.cwt.html
---
 requirements.txt | 1 +
 setup.py         | 2 +-
 ssim/ssimlib.py  | 6 +++---
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index bee0d6f..6ad4008 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
     author_email='jterr...@gmail.com',
     platforms=['any'],
     license='MIT License',
-    install_requires=['numpy', 'pillow', 'scipy'],
+    install_requires=['numpy', 'pillow', 'scipy', 'PyWavelets'],
     url='https://github.com/jterrace/pyssim',
     entry_points={
         'console_scripts': [
diff --git a/ssim/ssimlib.py b/ssim/ssimlib.py
index b40a8d4..46bde93 100644
--- a/ssim/ssimlib.py
+++ b/ssim/ssimlib.py
@@ -7,7 +7,7 @@
 import sys
 
 import numpy as np
-from scipy import signal
+import pywt
 
 from ssim import compat
 from ssim.compat import Image, ImageOps
@@ -168,8 +168,8 @@ def cw_ssim_value(self, target, width=30):
         sig2 = np.asarray(target.img_gray.getdata())
 
         # Convolution
-        cwtmatr1 = signal.cwt(sig1, signal.ricker, widths)
-        cwtmatr2 = signal.cwt(sig2, signal.ricker, widths)
+        cwtmatr1, freqs1 = pywt.cwt(sig1, widths, 'mexh')
+        cwtmatr2, freqs2 = pywt.cwt(sig2, widths, 'mexh')
 
         # Compute the first term
         c1c2 = np.multiply(abs(cwtmatr1), abs(cwtmatr2))

Reply via email to