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/mapserver] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Tue, 28 Jul 2026 14:37:44 GMT	[thread overview]
Message-ID: <178524946489.1.5154907263641068761.rpms-mapserver-1d47d8d57556@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-07-28 14:37 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=178524946489.1.5154907263641068761.rpms-mapserver-1d47d8d57556@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