Bug#1075614: v-sim: diff for NMU version 3.7.2-9.1
Sudip Mukherjee
sudipm.mukherjee at gmail.com
Tue Feb 18 15:10:06 GMT 2025
Control: tags 1075614 + patch
Control: tags 1075614 + pending
--
Dear maintainer,
I've prepared an NMU for v-sim (versioned as 3.7.2-9.1) and
uploaded it to DELAYED/10. Please feel free to tell me if I
should delay it longer.
--
Regards
Sudip
diff -Nru v-sim-3.7.2/debian/changelog v-sim-3.7.2/debian/changelog
--- v-sim-3.7.2/debian/changelog 2022-11-14 20:28:37.000000000 +0000
+++ v-sim-3.7.2/debian/changelog 2025-02-18 14:56:13.000000000 +0000
@@ -1,3 +1,10 @@
+v-sim (3.7.2-9.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Set program_name using PyConfig to fix FTBFS. (Closes: #1075614)
+
+ -- Sudip Mukherjee <sudipm.mukherjee at gmail.com> Tue, 18 Feb 2025 14:56:13 +0000
+
v-sim (3.7.2-9) unstable; urgency=medium
[ Florian Ernst ]
diff -Nru v-sim-3.7.2/debian/patches/series v-sim-3.7.2/debian/patches/series
--- v-sim-3.7.2/debian/patches/series 2022-11-14 20:27:51.000000000 +0000
+++ v-sim-3.7.2/debian/patches/series 2025-02-18 14:55:28.000000000 +0000
@@ -2,3 +2,4 @@
direct-overrides-import.patch
openbabel3-build.patch
openbabel3-plugin.patch
+set-progname.patch
diff -Nru v-sim-3.7.2/debian/patches/set-progname.patch v-sim-3.7.2/debian/patches/set-progname.patch
--- v-sim-3.7.2/debian/patches/set-progname.patch 1970-01-01 01:00:00.000000000 +0100
+++ v-sim-3.7.2/debian/patches/set-progname.patch 2025-02-18 14:54:40.000000000 +0000
@@ -0,0 +1,26 @@
+Description: Set program_name using PyConfig to fix FTBFS
+
+Bug-Debian: https://bugs.debian.org/1075614
+Last-Update: 2025-02-18
+--
+
+--- v-sim-3.7.2.orig/lib/plug-ins/python-gi/pythongi.c
++++ v-sim-3.7.2/lib/plug-ins/python-gi/pythongi.c
+@@ -225,8 +225,15 @@ static void initialisePython()
+ return;
+
+ DBG_fprintf(stderr, "Panel PythonGI: initialise Python.\n");
+- Py_SetProgramName((char*)commandLineGet_programName());
+- Py_Initialize();
++
++ /* Py_SetProgramName deprecated by python 3.11 */
++ /* https://docs.python.org/3/c-api/init_config.html#preinitialize-python-with-pypreconfig */
++
++ PyConfig config;
++ PyConfig_InitPythonConfig(&config);
++ PyConfig_SetBytesString(&config, &config.program_name, (char *)commandLineGet_programName());
++
++ Py_InitializeFromConfig(&config);
+ DBG_fprintf(stderr, "Panel PythonGI: import sys.\n"
+ "import os;\n"
+ "os.putenv(\"GI_TYPELIB_PATH\", \"" VISU_TYPELIBS_DIR "\")\n");
More information about the debian-science-maintainers
mailing list