Hello community, here is the log from the commit of package FreeCAD for openSUSE:Factory checked in at 2020-03-16 10:20:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/FreeCAD (Old) and /work/SRC/openSUSE:Factory/.FreeCAD.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "FreeCAD" Mon Mar 16 10:20:10 2020 rev:20 rq:785389 version:0.18.4 Changes: -------- --- /work/SRC/openSUSE:Factory/FreeCAD/FreeCAD.changes 2020-01-27 00:22:29.057498312 +0100 +++ /work/SRC/openSUSE:Factory/.FreeCAD.new.3160/FreeCAD.changes 2020-03-16 10:21:44.491670407 +0100 @@ -1,0 +2,27 @@ +Sun Mar 15 18:13:15 UTC 2020 - Stefan Brüns <[email protected]> + +- 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 + +------------------------------------------------------------------- +Sat Mar 14 15:12:29 UTC 2020 - Stefan Brüns <[email protected]> + +- 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 + +------------------------------------------------------------------- @@ -11,3 +38,6 @@ - * fixes #0004182: Segfault when clicking constraints from a different viewport [skip ci] - * See discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=41879 - * fixes #0004233: Access violation and file corruption on undo duplicate sketch + * fixes #0004182: Segfault when clicking constraints from a + different viewport [skip ci] + * [Draft] ImportDXF 0.18 Bug upgrading from 0.16. See discussion + https://forum.freecadweb.org/viewtopic.php?f=3&t=41879 + * fixes #0004233: Access violation and file corruption on undo + duplicate sketch @@ -17,3 +47,5 @@ - * [AddonManager] 0.18 Improve Non GitPython Error.. - * ...Handling. Previous output when clicking Macros tab caused errors in Report View with no Macros loaded at all. - * fix encoding problem when clicking a link on StartPage if application is installed into a directory with non-ASCII characters + * [AddonManager] 0.18 Improve Non GitPython Error Handling. + Previous output when clicking Macros tab caused errors in + Report View with no Macros loaded at all. + * fix encoding problem when clicking a link on StartPage if + application is installed into a directory with non-ASCII characters @@ -21 +52,0 @@ - Old: ---- 0002-fix-compile.patch New: ---- 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch fix_unittestgui_tkinter_py3.patch update-swigpyrunin-for-python-3.8.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ FreeCAD.spec ++++++ --- /var/tmp/diff_new_pack.W7wcAd/_old 2020-03-16 10:21:51.567673289 +0100 +++ /var/tmp/diff_new_pack.W7wcAd/_new 2020-03-16 10:21:51.567673289 +0100 @@ -41,16 +41,19 @@ Source3: FreeCAD_shared_mimeinfo # PATCH-FIX-UPSTREAM 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch -- Fix build with shiboken2/pyside2 >= 5.12.1 Patch1: 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch -# PATCH-FIX-UPSTREAM 0002-fix-compile.patch -Patch2: 0002-fix-compile.patch # PATCH-FIX-OPENSUSE qt-5.14.patch Patch3: 0003-qt-5.14.patch +# PATCH-FIX-UPSTREAM https://github.com/FreeCAD/FreeCAD/commit/6eacb17b3e03d200.patch +Patch4: update-swigpyrunin-for-python-3.8.patch +# PATCH-FIX-UPSTREAM https://github.com/FreeCAD/FreeCAD/pull/2899 +Patch5: 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch +# PATCH-FIX-OPENSUSE Use correct import for Python 3 tkinter +Patch6: fix_unittestgui_tkinter_py3.patch # Test suite fails on 32bit and I don't want to debug that anymore ExcludeArch: %ix86 %arm ppc s390 s390x BuildRequires: Coin-devel -%if 0%{?suse_version} >= 1330 BuildRequires: libboost_filesystem-devel >= 1.55 BuildRequires: libboost_graph-devel >= 1.55 BuildRequires: libboost_program_options-devel >= 1.55 @@ -61,9 +64,6 @@ %endif BuildRequires: libboost_system-devel >= 1.55 BuildRequires: libboost_thread-devel >= 1.55 -%else -BuildRequires: boost-devel >= 1.55 -%endif BuildRequires: cmake BuildRequires: dos2unix @@ -78,6 +78,7 @@ BuildRequires: glew-devel BuildRequires: graphviz BuildRequires: hdf5-devel +BuildRequires: hicolor-icon-theme # We use the internal smesh version with fixes atm #BuildRequires: smesh-devel BuildRequires: libXerces-c-devel @@ -88,10 +89,9 @@ BuildRequires: netgen-devel # we use upstream OpenCASCADE instead of oce-devel atm BuildRequires: occt-devel -BuildRequires: opencv-devel BuildRequires: pkg-config -%if 0%{?suse_version} >= 1330 +%if 0%{?suse_version} # Qt5 & python3 BuildRequires: python3-devel BuildRequires: python3-matplotlib @@ -120,7 +120,8 @@ # reported to break FreeCAD here # https://forum.freecadweb.org/viewtopic.php?t=24610 Conflicts: python-pivy -%else +%endif +%if 0%{?fedora} > 18 BuildRequires: libshiboken-devel BuildRequires: python-CXX-devel BuildRequires: python-devel @@ -130,13 +131,6 @@ BuildRequires: pkgconfig(QtWebKit) Requires: python-numpy Requires: python-pyside -%if 0%{?suse_version} > 0 -# Qt4 & python2 -BuildRequires: libqt4-devel -BuildRequires: python-xml -%endif -%endif -%if 0%{?fedora} > 18 BuildRequires: qt5-qtbase-devel %endif @@ -176,9 +170,9 @@ %autopatch -p1 # fix env-script-interpreter -sed -i '1c#!%{__python2}' \ +sed -i '1c#!%{__python3}' \ src/Mod/Test/testmakeWireString.py \ - src/Mod/Test/unittestgui.py + src/Mod/Robot/MovieTool.py # Fix "wrong-file-end-of-line-encoding" rpmlint warning sed -i 's/\r$//' ChangeLog.txt @@ -207,12 +201,10 @@ -DRESOURCEDIR=%{_datadir}/%{name} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ -%if 0%{?suse_version} >= 1330 -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DSHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2/ \ -DPYSIDE_INCLUDE_DIR=/usr/include/PySide2/ \ -DBUILD_QT5=ON \ -%endif -DFREECAD_USE_EXTERNAL_PIVY:BOOL=TRUE \ -DBUILD_MESH_PART:BOOL=ON \ -DBUILD_OPENSCAD:BOOL=ON \ @@ -258,8 +250,15 @@ %{buildroot}%{x_prefix}/Mod/Test/unittestgui.py # Move desktop icon in the correct location -mkdir -p %{buildroot}%{_datadir}/pixmaps -mv %{buildroot}%{_datadir}/%{name}/freecad.xpm %{buildroot}%{_datadir}/pixmaps/freecad.xpm +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable +for size in 64 48 32 16; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/ + mv %{buildroot}%{_datadir}/%{name}/freecad-icon-${size}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/freecad.png +done +mv %{buildroot}%{_datadir}/%{name}/freecad.svg %{buildroot}%{_datadir}/icons/hicolor/scalable +mv %{buildroot}%{_datadir}/%{name}/freecad-doc.png %{buildroot}%{_datadir}/icons/hicolor/64x64/ +rm %{buildroot}%{_datadir}/%{name}/freecad.xpm %suse_update_desktop_file -c %{name} "%{name}" "3D CAD Modeler" %{name} "freecad" Education Engineering @@ -297,13 +296,9 @@ %fdupes -s %{buildroot} -%post -/sbin/ldconfig -%mime_database_post - -%postun -/sbin/ldconfig -%mime_database_postun +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig %files %license LICENSE @@ -313,7 +308,7 @@ %{_libdir}/%{name} %{_datadir}/%{name}/ %{_datadir}/mime/packages/%{name}.xml -%{_datadir}/pixmaps/freecad.xpm %{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/*/freecad*.{png,svg} %changelog ++++++ 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch ++++++ >From 96af5fea1fab074e93011078974fd24fff1068f8 Mon Sep 17 00:00:00 2001 From: looooo <[email protected]> Date: Tue, 14 Jan 2020 13:45:35 +0100 Subject: [PATCH] fem: use time.process_time instead of removed time.clock() [rebased on 0.18.4 branch] --- src/Mod/Fem/femmesh/femmesh2mesh.py | 4 ++-- src/Mod/Fem/femsolver/calculix/writer.py | 9 +++++++-- src/Mod/Fem/femsolver/z88/writer.py | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Mod/Fem/femmesh/femmesh2mesh.py b/src/Mod/Fem/femmesh/femmesh2mesh.py index 9c0b4f1b9..e6159f2c7 100644 --- a/src/Mod/Fem/femmesh/femmesh2mesh.py +++ b/src/Mod/Fem/femmesh/femmesh2mesh.py @@ -90,7 +90,7 @@ def femmesh_2_mesh(myFemMesh, myResults=None): # This code generates a dict and a faceCode for each face of all elements # All faceCodes are than sorted. - start_time = time.clock() + start_time = time.process_time() faceCodeList = [] faceCodeDict = {} @@ -194,6 +194,6 @@ def femmesh_2_mesh(myFemMesh, myResults=None): output_mesh.extend(triangle) # print('my 2. triangle: ', triangle) - end_time = time.clock() + end_time = time.process_time() print('Mesh by surface search method: ', end_time - start_time) return output_mesh diff --git a/src/Mod/Fem/femsolver/calculix/writer.py b/src/Mod/Fem/femsolver/calculix/writer.py index e9d9e9bae..33302cefa 100644 --- a/src/Mod/Fem/femsolver/calculix/writer.py +++ b/src/Mod/Fem/femsolver/calculix/writer.py @@ -69,12 +69,17 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter): FreeCAD.Console.PrintMessage('FemInputWriterCcx --> self.file_name --> ' + self.file_name + '\n') def write_calculix_input_file(self): - timestart = time.clock() + timestart = time.process_time() + FreeCAD.Console.PrintMessage("Start writing CalculiX input file\n") + FreeCAD.Console.PrintMessage("Write ccx input file to: {}\n".format(self.file_name)) if self.solver_obj.SplitInputWriter is True: self.write_calculix_splitted_input_file() else: self.write_calculix_one_input_file() - writing_time_string = "Writing time input file: " + str(round((time.clock() - timestart), 2)) + " seconds" + writing_time_string = ( + "Writing time CalculiX input file: {} seconds" + .format(round((time.process_time() - timestart), 2)) + ) if self.femelement_count_test is True: FreeCAD.Console.PrintMessage(writing_time_string + ' \n\n') return self.file_name diff --git a/src/Mod/Fem/femsolver/z88/writer.py b/src/Mod/Fem/femsolver/z88/writer.py index e141ab9f0..cdcaff63b 100644 --- a/src/Mod/Fem/femsolver/z88/writer.py +++ b/src/Mod/Fem/femsolver/z88/writer.py @@ -61,7 +61,7 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter): FreeCAD.Console.PrintMessage('FemInputWriterZ88 --> self.file_name --> ' + self.file_name + '\n') def write_z88_input(self): - timestart = time.clock() + timestart = time.process_time() if not self.femnodes_mesh: self.femnodes_mesh = self.femmesh.Nodes if not self.femelement_table: @@ -76,7 +76,11 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter): self.write_z88_integration_properties() self.write_z88_memory_parameter() self.write_z88_solver_parameter() - FreeCAD.Console.PrintMessage("Writing time input file: " + str(time.clock() - timestart) + ' \n\n') + writing_time_string = ( + "Writing time input file: {} seconds" + .format(round((time.process_time() - timestart), 2)) + ) + FreeCAD.Console.PrintMessage(writing_time_string + " \n\n") return self.dir_name def set_z88_elparam(self): -- 2.25.1 ++++++ FreeCAD-0.18.4.obscpio ++++++ /work/SRC/openSUSE:Factory/FreeCAD/FreeCAD-0.18.4.obscpio /work/SRC/openSUSE:Factory/.FreeCAD.new.3160/FreeCAD-0.18.4.obscpio differ: char 49, line 1 ++++++ FreeCAD.obsinfo ++++++ --- /var/tmp/diff_new_pack.W7wcAd/_old 2020-03-16 10:21:51.655673325 +0100 +++ /var/tmp/diff_new_pack.W7wcAd/_new 2020-03-16 10:21:51.655673325 +0100 @@ -1,5 +1,5 @@ name: FreeCAD version: 0.18.4 -mtime: 1578760669 -commit: 9ae129705652eec6be426211e5eaaa16c847b7c5 +mtime: 1582676121 +commit: 783e1346c7a078f5265c3f0c6a927d09a8c1fe70 ++++++ fix_unittestgui_tkinter_py3.patch ++++++ 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 ############################################################################## ++++++ update-swigpyrunin-for-python-3.8.patch ++++++ >From 6eacb17b3e03d20039b85c9daebab9e44386d6bf Mon Sep 17 00:00:00 2001 From: Richard <[email protected]> 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);
