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/gnucash] f43: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Tue, 28 Jul 2026 21:22:40 GMT [thread overview]
Message-ID: <178527376018.1.6207567240977685212.rpms-gnucash-01bc73ce3372@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gnucash
Branch : f43
Commit : 01bc73ce33727c9d80f027ec27e11b2b2d70039d
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-07-28T15:29:18+02:00
Stats : +58/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gnucash/c/01bc73ce33727c9d80f027ec27e11b2b2d70039d?branch=f43
Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
---
diff --git a/gnucash-swig45.patch b/gnucash-swig45.patch
new file mode 100644
index 0000000..6adce57
--- /dev/null
+++ b/gnucash-swig45.patch
@@ -0,0 +1,51 @@
+diff -up gnucash-5.14/bindings/python/gnucash_core.i.swig45 gnucash-5.14/bindings/python/gnucash_core.i
+--- gnucash-5.14/bindings/python/gnucash_core.i.swig45 2026-07-28 08:00:55.910937924 +0200
++++ gnucash-5.14/bindings/python/gnucash_core.i 2026-07-28 08:00:55.913959681 +0200
+@@ -122,7 +122,7 @@
+ %typemap(out) GncOwner * {
+ GncOwnerType owner_type = gncOwnerGetType($1);
+ PyObject * owner_tuple = PyTuple_New(2);
+- PyTuple_SetItem(owner_tuple, 0, PyInt_FromLong( (long) owner_type ) );
++ PyTuple_SetItem(owner_tuple, 0, PyLong_FromLong( (long) owner_type ) );
+ PyObject * swig_wrapper_object;
+ if (owner_type == GNC_OWNER_CUSTOMER ){
+ swig_wrapper_object = SWIG_NewPointerObj(
+diff -up gnucash-5.14/bindings/python/time64.i.swig45 gnucash-5.14/bindings/python/time64.i
+--- gnucash-5.14/bindings/python/time64.i.swig45 2026-07-28 08:00:55.908937885 +0200
++++ gnucash-5.14/bindings/python/time64.i 2026-07-28 08:00:55.912937963 +0200
+@@ -35,7 +35,7 @@
+ %typemap(in) time64 {
+ PyDateTime_IMPORT;
+
+- if (!PyDate_Check($input) && !PyInt_Check($input)) {
++ if (!PyDate_Check($input) && !PyLong_Check($input)) {
+ PyErr_SetString(PyExc_ValueError,"date, datetime or integer expected");
+ return NULL;
+ }
+@@ -49,7 +49,7 @@
+ PyDateTime_GET_YEAR($input) - 1900};
+ $1 = gnc_mktime(&time);
+ } else {
+- $1 = PyInt_AsLong($input);
++ $1 = PyLong_AsLong($input);
+ }
+ }
+
+@@ -79,7 +79,7 @@
+ %typemap(in) time64 * (time64 secs) {
+ PyDateTime_IMPORT;
+
+- if (!PyDate_Check($input) && !PyInt_Check($input)) {
++ if (!PyDate_Check($input) && !PyLong_Check($input)) {
+ PyErr_SetString(PyExc_ValueError,"date, datetime or integer expected");
+ return NULL;
+ }
+@@ -94,7 +94,7 @@
+ time64 secs = gnc_mktime(&time);
+ $1 = &secs;
+ } else {
+- time64 secs = PyInt_AsLong($input);
++ time64 secs = PyLong_AsLong($input);
+ $1 = &secs;
+ }
+ }
diff --git a/gnucash.spec b/gnucash.spec
index 4d89fc6..f319de2 100644
--- a/gnucash.spec
+++ b/gnucash.spec
@@ -6,7 +6,7 @@ Name: gnucash
Summary: Finance management application
Version: 5.14
URL: https://gnucash.org/
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPL-2.0-or-later
Source: https://downloads.sourceforge.net/sourceforge/gnucash/gnucash-%{version}.tar.bz2
@@ -14,6 +14,9 @@ ExcludeArch: %{ix86}
Patch0: rpath.patch
Patch1: no-implicit.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch2: gnucash-swig45.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1563466
ExcludeArch: ppc64 s390x
@@ -120,6 +123,9 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/gnucas
%config(noreplace) %{_sysconfdir}/gnucash/*
%changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 5.14-8
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 5.14-7
- Rebuilt for Python 3.15.0b4 ABI change
reply other threads:[~2026-07-28 21:22 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=178527376018.1.6207567240977685212.rpms-gnucash-01bc73ce3372@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