- Fix runtime errors with Python 3.8: * 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch - Fix last python2 she-bang remainders, fix imports: * fix_unittestgui_tkinter_py3.patch - Remove unnecessary opencv build dependency - update to current 0.18 branch: * Fem: fix segmentation fault when opening contraint transform panel. Fix Python code * Part: the number of domains returned by TopoShape::getDomains must match with number of faces * apply fixes from master when building with occt 7.4 + Drop 0002-fix-compile.patch - Fix build with Python 3.8: Add update-swigpyrunin-for-python-3.8.patch - Spec file cleanup * Drop xpm FreeCAD icon * Install PNGs/SVG icons in correct paths * Remove obsolete update_mime_database calls in %post * Remove obsolete conditionals for Leap 42.x OBS-URL: https://build.opensuse.org/request/show/785385 OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=105
28 lines
1023 B
Diff
28 lines
1023 B
Diff
From 6eacb17b3e03d20039b85c9daebab9e44386d6bf Mon Sep 17 00:00:00 2001
|
|
From: Richard <hobbes1069@gmail.com>
|
|
Date: Thu, 17 Oct 2019 11:20:10 -0500
|
|
Subject: [PATCH] Update swigpyrun.in for Python 3.8
|
|
|
|
In Python 3.8 some functions related to thread state were intentionally made private.
|
|
|
|
This fix (specific to FreeCAD) was suggested here:
|
|
|
|
https://bugs.python.org/issue35886
|
|
---
|
|
src/Base/swigpyrun.inl | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/Base/swigpyrun.inl b/src/Base/swigpyrun.inl
|
|
index 0eedaaa87a9..65bba62db3c 100644
|
|
--- a/src/Base/swigpyrun.inl
|
|
+++ b/src/Base/swigpyrun.inl
|
|
@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName)
|
|
|
|
PyObject *module, *dict;
|
|
PyInterpreterState *interp = PyThreadState_GET()->interp;
|
|
- PyObject *modules = interp->modules;
|
|
+ PyObject *modules = PyImport_GetModuleDict();
|
|
module = PyDict_GetItemString(modules, "__builtin__");
|
|
if (module != NULL && PyModule_Check(module)) {
|
|
dict = PyModule_GetDict(module);
|