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

A new commit has been pushed.

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

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

---
diff --git a/openmeeg-swig45.patch b/openmeeg-swig45.patch
new file mode 100644
index 0000000..cd2da27
--- /dev/null
+++ b/openmeeg-swig45.patch
@@ -0,0 +1,12 @@
+diff -up openmeeg-2.5.16/wrapping/python/openmeeg/_openmeeg.i.swig45 openmeeg-2.5.16/wrapping/python/openmeeg/_openmeeg.i
+--- openmeeg-2.5.16/wrapping/python/openmeeg/_openmeeg.i.swig45	2026-07-28 10:15:42.082507949 +0200
++++ openmeeg-2.5.16/wrapping/python/openmeeg/_openmeeg.i	2026-07-28 10:15:42.087239833 +0200
+@@ -378,7 +378,7 @@ namespace OpenMEEG {
+     // C++ -> Python
+ 
+     %typemap(out) unsigned& {
+-        $result = PyInt_FromLong(*($1));
++        $result = PyLong_FromLong(*($1));
+     }
+ }
+ 

diff --git a/openmeeg.spec b/openmeeg.spec
index 2563e8f..3b55013 100644
--- a/openmeeg.spec
+++ b/openmeeg.spec
@@ -36,6 +36,9 @@ URL:     http://openmeeg.github.io/
 Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
 Patch0:  %{name}-use_builtin_find_blas_lapack.patch
 Patch1:  %{name}-fix-cmake4.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch2:  %{name}-swig45.patch
 
 BuildRequires: make
 BuildRequires: cmake
@@ -166,6 +169,7 @@ BuildArch:      noarch
 %patch -P 0 -p1 -b .backup
 %endif
 %patch -P 1 -p1 -b .backup
+%patch -P 2 -p1
 
 %build
 %if %{with debug}

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

only message in thread, other threads:[~2026-08-02 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-02 14:36 [rpms/openmeeg] 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