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/hamlib] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Tue, 28 Jul 2026 22:48:33 GMT	[thread overview]
Message-ID: <178527891319.1.3539061182931127138.rpms-hamlib-058d53b8aa17@fedoraproject.org> (raw)

A new commit has been pushed.

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

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

---
diff --git a/hamlib-swig45.patch b/hamlib-swig45.patch
new file mode 100644
index 0000000..a3c51d3
--- /dev/null
+++ b/hamlib-swig45.patch
@@ -0,0 +1,21 @@
+diff -up hamlib-4.6.5/bindings/hamlib.swg.swig45 hamlib-4.6.5/bindings/hamlib.swg
+--- hamlib-4.6.5/bindings/hamlib.swg.swig45	2026-07-28 08:11:40.301526254 +0200
++++ hamlib-4.6.5/bindings/hamlib.swg	2026-07-28 08:11:40.304519798 +0200
+@@ -61,7 +61,7 @@
+   len = $1_dim0;
+   $result = PyList_New(len);
+   for (i = 0; i < len; i++) {
+-    PyList_SetItem($result,i,PyInt_FromLong((long)$1[i]));
++    PyList_SetItem($result,i,PyLong_FromLong((long)$1[i]));
+   }
+ }
+ 
+@@ -70,7 +70,7 @@
+   len = $1_dim0;
+   $result = PyList_New(len);
+   for (i = 0; i < len; i++) {
+-    PyList_SetItem($result,i,PyInt_FromLong((long)$1[i]));
++    PyList_SetItem($result,i,PyLong_FromLong((long)$1[i]));
+   }
+ }
+ 

diff --git a/hamlib.spec b/hamlib.spec
index 0dd67fc..0ea1b50 100644
--- a/hamlib.spec
+++ b/hamlib.spec
@@ -9,7 +9,7 @@
 
 Name:           hamlib
 Version:        4.6.5
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        Run-time library to control radio transceivers and receivers
 
 License:        GPL-2.0-or-later and LGPL-2.0-or-later
@@ -23,6 +23,9 @@ Source0:        https://github.com/Hamlib/Hamlib/archive/%{githash}/%{name}-%{sh
 Patch0:         hamlib-4.0-perl_install.patch
 # -lpython is not needed, https://github.com/Hamlib/Hamlib/issues/253
 Patch1:         hamlib-4.0-drop-libpython.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch2:         hamlib-swig45.patch
 
 ExcludeArch:    i686
 
@@ -243,6 +246,9 @@ make V=1 check
 
 
 %changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 4.6.5-9
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
 * Fri Jul 24 2026 Python Maint <python-maint@redhat.com> - 4.6.5-8
 - Rebuilt for Python 3.15.0b4 ABI change
 

                 reply	other threads:[~2026-07-28 22:48 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=178527891319.1.3539061182931127138.rpms-hamlib-058d53b8aa17@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