public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/med] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-07-28 14:37 Jitka Plesnikova
0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-07-28 14:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/med
Branch : rawhide
Commit : 12cf8b8e6f01904fd89ebd0791a7a61447aa951d
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-07-28T15:29:18+02:00
Stats : +21/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/med/c/12cf8b8e6f01904fd89ebd0791a7a61447aa951d?branch=rawhide
Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
---
diff --git a/med-swig45.patch b/med-swig45.patch
new file mode 100644
index 0000000..5cd1884
--- /dev/null
+++ b/med-swig45.patch
@@ -0,0 +1,14 @@
+diff -up med-5.0.0/python/med_common.i.swig45 med-5.0.0/python/med_common.i
+--- med-5.0.0/python/med_common.i.swig45 2026-07-28 09:51:19.772950069 +0200
++++ med-5.0.0/python/med_common.i 2026-07-28 09:51:19.775950135 +0200
+@@ -13,8 +13,8 @@
+ /* fprintf(stderr,"Code erreur MED : %2d\n",result); */
+ /* SWIG_exception(SWIG_RuntimeError,"Error returned from MEDfichier API (funcname)."); */
+ PyObject* exobj = PyTuple_New(2);
+- PyTuple_SetItem(exobj,0,PyString_FromString("Error returned from MEDfichier API (funcname)."));
+- PyTuple_SetItem(exobj,1,PyInt_FromLong((long) result));
++ PyTuple_SetItem(exobj,0,PyUnicode_FromString("Error returned from MEDfichier API (funcname)."));
++ PyTuple_SetItem(exobj,1,PyLong_FromLong((long) result));
+ SWIG_Python_SetErrorObj(PyExc_RuntimeError,exobj);
+ /* PyErr_SetString(PyExc_Exception, str(result)); */
+ return NULL;
diff --git a/med.spec b/med.spec
index f2c1d8e..3fefbea 100644
--- a/med.spec
+++ b/med.spec
@@ -1,6 +1,6 @@
Name: med
Version: 5.0.0
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: Library to exchange meshed data
License: LGPL-3.0-or-later
@@ -22,6 +22,9 @@ Patch3: med-swig-4.3.0.patch
Patch4: med-gcc15.patch
# Fix build with cmake-4.3
Patch5: med-cmake43.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch6: med-swig45.patch
BuildRequires: gcc-c++
BuildRequires: cmake
@@ -136,6 +139,9 @@ rm -rf %{buildroot}%{_bindir}/testpy
%changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 5.0.0-15
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 5.0.0-14
- 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-07-28 14:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 14:37 [rpms/med] 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