public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jitka Plesnikova <jplesnik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/med] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Tue, 28 Jul 2026 14:37:33 GMT	[thread overview]
Message-ID: <178524945306.1.13106735830635471255.rpms-med-12cf8b8e6f01@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-07-28 14:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178524945306.1.13106735830635471255.rpms-med-12cf8b8e6f01@fedoraproject.org \
    --to=jplesnik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox