- 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
30 lines
905 B
Diff
30 lines
905 B
Diff
diff --git a/src/Mod/Test/unittestgui.py b/src/Mod/Test/unittestgui.py
|
|
index 6e93079b8..e6125a694 100755
|
|
--- a/src/Mod/Test/unittestgui.py
|
|
+++ b/src/Mod/Test/unittestgui.py
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/env python
|
|
+#!/usr/bin/python3
|
|
"""
|
|
GUI framework and application for use with Python unit testing framework.
|
|
Execute tests written using the framework provided by the 'unittest' module.
|
|
@@ -29,12 +29,15 @@ __version__ = "$Revision: 2.0 $"[11:-2]
|
|
|
|
import unittest
|
|
import sys
|
|
-import Tkinter
|
|
-import tkMessageBox
|
|
+if sys.version_info.major >= 3:
|
|
+ import tkinter as tk
|
|
+ from tkinter import messagebox as tkMessageBox
|
|
+else:
|
|
+ import Tkinter as tk
|
|
+ import tkMessageBox
|
|
import traceback
|
|
|
|
import string
|
|
-tk = Tkinter # Alternative to the messy 'from Tkinter import *' often seen
|
|
|
|
|
|
##############################################################################
|