public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gnucash] f43: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-07-28 21:22 Jitka Plesnikova
0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-07-28 21:22 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-28 21:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 21:22 [rpms/gnucash] f43: 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