File: python-3.10-pyinitialize.patch

package info (click to toggle)
esys-particle 2.3.5%2Bdfsg2-11
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,404 kB
  • sloc: cpp: 81,479; python: 5,872; makefile: 1,258; sh: 313; perl: 225
file content (19 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Don't call Py_Initialize before Py_Main
 This is unsupported, and breaks sys.path on Python 3.10.
 Since https://github.com/python/cpython/commit/af1d64d9f7a7cf673279725fdbaf4adcca51d41f
 See: https://bugs.python.org/issue36204
 See: https://bugs.python.org/issue34008
Bug-Debian: https://bugs.debian.org/1009240
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: https://code.launchpad.net/~stefanor/esys-particle/py310/+merge/419434

--- a/Python/MpiPython/MpiPythonMain.cpp
+++ b/Python/MpiPython/MpiPythonMain.cpp
@@ -48,7 +48,6 @@
     if(myrank==0){    // if rank==0 --> master
       // start python
       //     std::cout << "master start\n";
-      Py_Initialize();
       
 #if PY_VERSION_HEX >= 0x03000000
       wchar_t** wargv = new wchar_t*[argc+1];