public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hugin] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-08-11 10:22 Jitka Plesnikova
  0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-08-11 10:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/hugin
Branch : rawhide
Commit : e81eb6f0c3ced9722ab76e463b0df77969d41010
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2026-07-28T15:29:18+02:00
Stats  : +19/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/hugin/c/e81eb6f0c3ced9722ab76e463b0df77969d41010?branch=rawhide

Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility

---
diff --git a/hugin-swig45.patch b/hugin-swig45.patch
new file mode 100644
index 0000000..cea4f56
--- /dev/null
+++ b/hugin-swig45.patch
@@ -0,0 +1,12 @@
+diff -up hugin-2025.0.1/src/hugin_script_interface/hpi_classes.cpp.swig45 hugin-2025.0.1/src/hugin_script_interface/hpi_classes.cpp
+--- hugin-2025.0.1/src/hugin_script_interface/hpi_classes.cpp.swig45	2026-07-28 08:28:02.211218757 +0200
++++ hugin-2025.0.1/src/hugin_script_interface/hpi_classes.cpp	2026-07-28 08:28:02.213082688 +0200
+@@ -112,7 +112,7 @@ int python_interface::call_hpi ( const c
+         if ( pValue != NULL )
+         {
+             // the function should have returned an integer
+-            result = PyInt_AsLong ( pValue ) ;
++            result = PyLong_AsLong ( pValue ) ;
+             Py_DECREF(pValue);
+         }
+     }

diff --git a/hugin.spec b/hugin.spec
index 3457bf9..34e81b4 100644
--- a/hugin.spec
+++ b/hugin.spec
@@ -1,7 +1,7 @@
 Summary: A panoramic photo stitcher and more
 Name: hugin
 Version: 2025.0.1
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPL-2.0-or-later
 Source: https://downloads.sourceforge.net/hugin/%{name}-%{version}.tar.bz2
 URL: http://hugin.sourceforge.net/
@@ -15,6 +15,9 @@ BuildRequires: cmake desktop-file-utils OpenEXR-devel exiv2-devel libepoxy-devel
 BuildRequires: python3-devel swig perl-Image-ExifTool
 BuildRequires: mesa-libGLU-devel libXmu-devel sqlite-devel vigra-devel
 BuildRequires: perl-podlators fftw-devel lcms2-devel
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch0:         hugin-swig45.patch
 # contains deprecated distutils
 BuildRequires: python3-setuptools
 
@@ -188,6 +191,9 @@ EOF
 %{_mandir}/man1/hugin_lensdb.*
 
 %changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 2025.0.1-8
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
 * Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 2025.0.1-7
 - Rebuilt for Python 3.15.0b4 ABI change
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-11 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 10:22 [rpms/hugin] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility Jitka Plesnikova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox