public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/getdp] rawhide: Fix build with Python 3.13+ (rhbz#2578243)
Date: Thu, 26 Nov 2026 11:48:50 GMT [thread overview]
Message-ID: <179569373068.1.10884060641932314267.rpms-getdp-6199403e54db@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/getdp
Branch : rawhide
Commit : 6199403e54db372322a22ca417553ab1a2003b9f
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-11-25T22:17:41-03:00
Stats : +44/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/getdp/c/6199403e54db372322a22ca417553ab1a2003b9f?branch=rawhide
Log:
Fix build with Python 3.13+ (rhbz#2578243)
Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
---
diff --git a/getdp.spec b/getdp.spec
index 0779d23..7f4678e 100644
--- a/getdp.spec
+++ b/getdp.spec
@@ -1,7 +1,7 @@
Name: getdp
# TODO: Enablee building with gmsh support as soon as getdp does not require private gmsh api anymore
Version: 3.6.0
-Release: 19%{?dist}
+Release: 20%{?dist}
Summary: General Environment for the Treatment of Discrete Problems
License: GPL-2.0-or-later
@@ -10,6 +10,8 @@ Source0: http://www.geuz.org/getdp/src/%{name}-%{version}-source.tgz
# Increase cmake minimum version to 3.5
Patch0: getdp_cmakever.patch
+# Fix build with Python 3.16 (rhbz#2578243)
+Patch1: getdp_py316.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -48,7 +50,7 @@ developing applications that use %{name}.
%prep
-%autosetup -n %{name}-%{version}-source
+%autosetup -p1 -n %{name}-%{version}-source
# remove bundled libs
find contrib/ -mindepth 1 -maxdepth 1 -type d -not \( -name pewe \) -prune -exec rm -vrf {} ';'
@@ -96,6 +98,9 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name}
%{_libdir}/libgetdp.so
%changelog
+* Wed Nov 25 2026 Filipe Rosset <rosset.filipe@gmail.com> - 3.6.0-20
+- Fix build with Python 3.13+ (rhbz#2578243)
+
* Sun Oct 11 2026 Antonio Trande <sagitter@fedorapoject.org> - 3.6.0-19
- Rebuild for petsc-3.26.0
diff --git a/getdp_py316.patch b/getdp_py316.patch
new file mode 100644
index 0000000..8f158e7
--- /dev/null
+++ b/getdp_py316.patch
@@ -0,0 +1,37 @@
+--- getdp-3.6.0-source/src/common/Message.cpp 2026-11-25 21:22:54.143809584 -0300
++++ getdp-3.6.0-source-new/src/common/Message.cpp 2026-11-25 22:06:02.758506855 -0300
+@@ -4,6 +4,7 @@
+ // issues on https://gitlab.onelab.info/getdp/getdp/issues.
+
+ #include <clocale>
++#include <cwchar>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <math.h>
+@@ -129,6 +130,26 @@
+ Py_SetProgramName(argv[0]);
+ Py_InitializeEx(0);
+ PySys_SetArgv(argc, argv);
++#elif PY_VERSION_HEX >= 0x030C0000
++ // Python 3.16 removed Py_SetProgramName/PySys_SetArgv/Py_DecodeLocale;
++ // use the PyConfig API instead
++ int n = argc ? argc : 1;
++ std::vector<wchar_t *> wargv(n);
++ for(int i = 0; i < n; i++) {
++ size_t len = mbstowcs(NULL, argv[i], 0) + 1;
++ wargv[i] = new wchar_t[len];
++ mbstowcs(wargv[i], argv[i], len);
++ }
++ PyConfig config;
++ PyConfig_InitPythonConfig(&config);
++ config.parse_argv = 0;
++ config.program_name = wargv[0];
++ config.argv.length = n;
++ config.argv.items = wargv.data();
++ Py_InitializeFromConfig(&config);
++ // config is copied at init; free our buffers here, as
++ // PyConfig_Clear() would double-free (program_name aliases argv[0])
++ for(int i = 0; i < n; i++) delete[] wargv[i];
+ #else // requires Python 3.5
+ std::vector<wchar_t *> wargv(argc ? argc : 1);
+ for(int i = 0; i < argc; i++) wargv[i] = Py_DecodeLocale(argv[i], NULL);
reply other threads:[~2026-11-26 11:48 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=179569373068.1.10884060641932314267.rpms-getdp-6199403e54db@fedoraproject.org \
--to=rosset.filipe@gmail.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