public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mapserver] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-07-28 14:37 Jitka Plesnikova
  0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-07-28 14:37 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mapserver
Branch : rawhide
Commit : 1d47d8d575565abe01f959f5c427ed714c89034a
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/mapserver/c/1d47d8d575565abe01f959f5c427ed714c89034a?branch=rawhide

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

---
diff --git a/mapserver-swig45.patch b/mapserver-swig45.patch
new file mode 100644
index 0000000..7908209
--- /dev/null
+++ b/mapserver-swig45.patch
@@ -0,0 +1,14 @@
+diff -up MapServer-rel-8-6-5/src/mapscript/python/pymodule.i.swig45 MapServer-rel-8-6-5/src/mapscript/python/pymodule.i
+--- MapServer-rel-8-6-5/src/mapscript/python/pymodule.i.swig45	2026-07-28 09:49:26.599453237 +0200
++++ MapServer-rel-8-6-5/src/mapscript/python/pymodule.i	2026-07-28 09:49:26.602122121 +0200
+@@ -123,8 +123,8 @@ CreateTupleFromDoubleArray( double *firs
+             $1[i] = (char *)PyUnicode_AsUTF8(key);
+             $2[i] = (char *)PyUnicode_AsUTF8(val);
+         %#else
+-            $1[i] = PyString_AsString(key);
+-            $2[i] = PyString_AsString(val);
++            $1[i] = PyBytes_AsString(key);
++            $2[i] = PyBytes_AsString(val);
+         %#endif
+     }
+ 

diff --git a/mapserver.spec b/mapserver.spec
index baf7f0e..a2259f2 100644
--- a/mapserver.spec
+++ b/mapserver.spec
@@ -24,7 +24,7 @@
 
 Name:           mapserver
 Version:        8.6.5
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Platform for publishing spatial data and interactive mapping applications to the web
 %global dashver %(echo %version | sed 's|\\.|-|g')
 
@@ -32,6 +32,9 @@ License:        MIT
 URL:            https://mapserver.org
 
 Source0:        https://github.com/%{project_owner}/%{project_name}/archive/rel-%{dashver}/%{project_name}-%{version}.tar.gz
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch0:         mapserver-swig45.patch
 
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch: %{ix86}
@@ -337,6 +340,9 @@ rm %{buildroot}%{_usr}/%{_sysconfdir}/mapserver-sample.conf
 %{ruby_sitearchdir}/mapscript.so
 
 %changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 8.6.5-5
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
 * Fri Jul 24 2026 Python Maint <python-maint@redhat.com> - 8.6.5-4
 - 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 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 14:37 [rpms/mapserver] 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