public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mupdf] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-07-31 9:03 Jitka Plesnikova
0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-07-31 9:03 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/mupdf
Branch : rawhide
Commit : 398a6d8977441313ca5bb152c0c54c3007887d63
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-07-28T15:29:18+02:00
Stats : +15/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/mupdf/c/398a6d8977441313ca5bb152c0c54c3007887d63?branch=rawhide
Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
---
diff --git a/mupdf-swig45.patch b/mupdf-swig45.patch
new file mode 100644
index 0000000..53ca2f1
--- /dev/null
+++ b/mupdf-swig45.patch
@@ -0,0 +1,12 @@
+diff -up mupdf-1.27.2-source/scripts/wrap/swig.py.swig45 mupdf-1.27.2-source/scripts/wrap/swig.py
+--- mupdf-1.27.2-source/scripts/wrap/swig.py.swig45 2026-07-28 09:53:02.845224055 +0200
++++ mupdf-1.27.2-source/scripts/wrap/swig.py 2026-07-28 09:53:02.851224187 +0200
+@@ -738,7 +738,7 @@ def build_swig(
+ {
+ message += "Traceback (from traceback.format_tb()):\\n";
+ PyObject* traceback_dict = PyModule_GetDict(traceback);
+- PyObject* format_tb = PyDict_GetItem(traceback_dict, PyString_FromString("format_tb"));
++ PyObject* format_tb = PyDict_GetItem(traceback_dict, PyUnicode_FromString("format_tb"));
+ PyObject* ret = PyObject_CallFunctionObjArgs(format_tb, trace, NULL);
+ PyObject* iter = PyObject_GetIter(ret);
+ for(;;)
diff --git a/mupdf.spec b/mupdf.spec
index 4d3df7b..8f48d52 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -46,6 +46,9 @@ Patch: 0001-do-not-use-CXXFLAGS-with-swig.patch
Patch: 0001-pdf_font-report-font-name-in-warning.patch
# Upstreamable:
Patch: 0001-mupdfwrap_test-adjust-to-mupdf-1.27.x.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch: mupdf-swig45.patch
BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel desktop-file-utils
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-31 9:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 9:03 [rpms/mupdf] 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