Hello community, here is the log from the commit of package FreeCAD for openSUSE:Leap:15.2 checked in at 2020-05-12 11:40:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/FreeCAD (Old) and /work/SRC/openSUSE:Leap:15.2/.FreeCAD.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "FreeCAD" Tue May 12 11:40:10 2020 rev:23 rq:800708 version:0.18.4 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/FreeCAD/FreeCAD-test.changes 2020-01-16 11:54:07.676384695 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.FreeCAD.new.2738/FreeCAD-test.changes 2020-05-12 11:42:24.753006401 +0200 @@ -1,0 +2,12 @@ +Wed May 6 07:02:41 UTC 2020 - Wolfgang Bauer <[email protected]> + +- Only enable gmsh BuildRequires on Tumbleweed, it's not available + in Leap 15 + +------------------------------------------------------------------- +Sat Jul 27 03:34:10 UTC 2019 - Stefan Brüns <[email protected]> + +- Fix inverted logic when evaluating test suite exit code +- Add gmsh mesher to BuildRequires, increase FEM test coverage + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Leap:15.2/FreeCAD/FreeCAD.changes 2020-01-16 11:54:07.732384724 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.FreeCAD.new.2738/FreeCAD.changes 2020-05-12 11:42:24.801006502 +0200 @@ -1,0 +2,140 @@ +Wed Mar 18 09:34:33 UTC 2020 - Yunhe Guo <[email protected]> + +- Allow install with lowercase package name: zypper install freecad + +------------------------------------------------------------------- +Mon Mar 16 22:24:32 UTC 2020 - Stefan Brüns <[email protected]> + +- More spec file cleanup, removed duplicate files +- Use upstream provided desktop files, mimeinfo, etc + +------------------------------------------------------------------- +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 + +------------------------------------------------------------------- +Sat Jan 25 11:03:06 UTC 2020 - Hans-Peter Jansen <[email protected]> + +- make 0003-qt-5.14.patch do what it is advertising + * fix conditional in order to locate rcc/uic properly + +------------------------------------------------------------------- +Fri Jan 24 09:02:08 UTC 2020 - Adrian Schröter <[email protected]> + +- update to current 0.18 branch: + * 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 + * FEM: py3 fix in selection widget + * FEM: selection widgets, add some error prints + * FEM: equations, fix reset edit mode + * [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 + * [Arch] ArchMaterial 0.18 Fix Crash + +------------------------------------------------------------------- +Thu Jan 23 16:41:29 UTC 2020 - Adrian Schröter <[email protected]> + +- fix build with new gcc and Qt 5.14 + (0002-fix-compile.patch 0003-qt-5.14.patch) + +------------------------------------------------------------------- +Wed Oct 30 16:06:43 UTC 2019 - Adrian Schröter <[email protected]> + +- Update to final 0.18.4 + * pre-select name filter in import/export file dialog + +------------------------------------------------------------------- +Tue Oct 22 06:46:22 UTC 2019 - Adrian Schröter <[email protected]> + +- update to current 0.18 branch, esp for Qt >= 5.9 fixes + * [TD]Fix slow GC of QGIPrimPath + * [Spreadsheet] Excel File Import fix Py3 bug + * [Path] Fix xrange bug with Py3 + * fix print preview function for >= Qt 5.9 + * Backport: startwb files restored in 0.18.3 to display thumbs correctly + * 0.18.x displays the example files within in the Start WB without their + respective thumbs. This PR restores that functionality + * Fixed problems with 'pythonopen' + * Correction of drill speed calculation + * Material: py2 fix in depreciated mat file parser (back port from 0.19) + * [TD]Fix #4017 Crash on bad hatch scale + +------------------------------------------------------------------- +Thu Jul 18 11:01:30 UTC 2019 - Adrian Schröter <[email protected]> + +- Update to 0.18.3 + * AddonManager: Skip non-github addons + * Sketcher: Fix Carbon copy leads to unsolvable sketch + * Sketcher: Fix carbon copy construction points + * fixes #0003993: Memory leak with Python3 + * code simplification in PythonWrapper + * issue #0003984: Creating a Path Job object fails with 'PySide2.QtWidgets.QDialog' object has no attribute 'templateGroup' + * Fixes bug #4008: removes phantom path cause + * Fix crash in case encoding of Python paths fails + * [Material] Respect unicode filenames Fixes #4027 + * BrowserView: fix QWebEngine crash + * Py3: no __builtin__ module available + * fixes 0004010: Box Selection + Part -> MakeCompound will crash FreeCAD + * FEM: solver elmer tasks, Py3 decode fix + * make OpenSCAD utilities working again with Py2 + +------------------------------------------------------------------- +Fri Jul 12 22:23:09 UTC 2019 - Stefan Brüns <[email protected]> + +- Remove MPI dependencies, as these are not used for the built package, + but adversely affect build times and rebuilds. + Proper MPI integration needs more work and has to ensure the base version + of FreeCAD can be used without prior manual setup of an MPI environment. + Remove 0001-find-openmpi2-include-files.patch, mpicc/mpicxx would + pick up the correct include path by themselfs. +- Sort BuildRequires: again + +------------------------------------------------------------------- +Thu Jun 13 12:25:02 UTC 2019 - Christophe Giboudeaux <[email protected]> + +- Add 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch to fix + build with recent shiboken2/pyside2 releases. + +------------------------------------------------------------------- +Sun May 12 07:21:14 UTC 2019 - Adrian Schröter <[email protected]> + +- Update to 0.18.2 + * replace insecure use of eval() with proper use of units + * py3/py2: use exec as function + * Arch: Fixed error in roof - Fixes #3864 + * Draft: Fixed 0.18.1 bug in DXF importer + * Py3 fix: correctly convert a Python str to const char* + * Py3 fix reading/writing from/to OBJ file + * fixes 0003913: libspnav crash on linux wayland during startup + +------------------------------------------------------------------- Old: ---- 0001-find-openmpi2-include-files.patch FreeCAD-0.18.1.obscpio FreeCAD.sh FreeCADCmd.sh FreeCAD_shared_mimeinfo New: ---- 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch 0001-fem-use-time.process_time-instead-of-removed-time.cl.patch 0003-qt-5.14.patch FreeCAD-0.18.4.obscpio fix_unittestgui_tkinter_py3.patch update-swigpyrunin-for-python-3.8.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ FreeCAD-test.spec ++++++ --- /var/tmp/diff_new_pack.XmdATD/_old 2020-05-12 11:42:28.009013242 +0200 +++ /var/tmp/diff_new_pack.XmdATD/_new 2020-05-12 11:42:28.009013242 +0200 @@ -1,7 +1,7 @@ # # spec file for package FreeCAD-test # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,16 @@ Name: FreeCAD-test -Version: 0.18.1 +Version: 0.18.4 Release: 0 Summary: Meta source package that runs the FreeCAD testsuite when built License: LGPL-2.0-or-later AND GPL-2.0-or-later Group: Productivity/Graphics/CAD -Url: http://www.freecadweb.org/ +URL: http://www.freecadweb.org/ BuildRequires: FreeCAD +%if 0%{?suse_version} > 1500 +BuildRequires: gmsh +%endif # Test suite fails on 32bit and I don't want to debug that anymore ExcludeArch: %ix86 %arm ppc s390 s390x @@ -33,7 +36,10 @@ %build export LC_ALL="C.utf-8" -#FreeCAD --console --write-log --log-file=/tmp/FreeCAD.log --run-test 0 || exit 1 -FreeCAD --console --run-test 0 || exit 1 +file=`mktemp` +if ! FreeCAD --console --write-log --log-file="$file" --run-test 0; then + cat "$file" + exit 1 +fi %changelog ++++++ FreeCAD.spec ++++++ --- /var/tmp/diff_new_pack.XmdATD/_old 2020-05-12 11:42:28.025013276 +0200 +++ /var/tmp/diff_new_pack.XmdATD/_new 2020-05-12 11:42:28.029013284 +0200 @@ -1,7 +1,7 @@ # # spec file for package FreeCAD # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,24 +27,30 @@ %endif Name: FreeCAD -Version: 0.18.1 +Version: 0.18.4 Release: 0 Summary: General Purpose 3D CAD Modeler License: LGPL-2.0-or-later AND GPL-2.0-or-later Group: Productivity/Graphics/CAD -Url: https://www.freecadweb.org/ +URL: https://www.freecadweb.org/ %if %{build_tar_ball} Source0: %{name}-%version.tar.xz %endif -Source1: FreeCAD.sh -Source2: FreeCADCmd.sh -Source3: FreeCAD_shared_mimeinfo -Patch2: 0001-find-openmpi2-include-files.patch +# 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-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 -%if 0%{?suse_version} >= 1330 +BuildRequires: Coin-devel BuildRequires: libboost_filesystem-devel >= 1.55 BuildRequires: libboost_graph-devel >= 1.55 BuildRequires: libboost_program_options-devel >= 1.55 @@ -55,9 +61,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 @@ -70,25 +73,23 @@ BuildRequires: gcc-fortran BuildRequires: git BuildRequires: glew-devel -BuildRequires: hdf5-openmpi-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 +BuildRequires: libXi-devel BuildRequires: libmed-devel -BuildRequires: netgen-devel - BuildRequires: libspnav-devel BuildRequires: make +BuildRequires: netgen-devel # we use upstream OpenCASCADE instead of oce-devel atm -BuildRequires: Coin-devel -BuildRequires: libXi-devel BuildRequires: occt-devel -BuildRequires: opencv-devel BuildRequires: pkg-config -%if 0%{?suse_version} >= 1330 +%if 0%{?suse_version} # Qt5 & python3 -BuildRequires: openmpi2-devel BuildRequires: python3-devel BuildRequires: python3-matplotlib BuildRequires: python3-pyside2-devel @@ -116,7 +117,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 @@ -126,13 +128,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 @@ -148,6 +143,8 @@ Recommends: ccx +Provides: freecad + %description FreeCAD is a parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows modifying designs by @@ -169,12 +166,12 @@ mv %_sourcedir/%name-%version %_builddir/%name-%version %setup -q -D -T 0 %endif -%patch2 -p1 +%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 @@ -188,27 +185,21 @@ rm src/3rdparty/Pivy-0.5 -fr %build -mkdir build && cd build -# cmake macro would set standard libdir -# it needs an older specific zipios version -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE - -printenv -cmake \ - -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \ +%cmake \ + -DCMAKE_INSTALL_PREFIX=%{x_prefix} \ -DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \ + -DCMAKE_INSTALL_LIBDIR=%{x_prefix}/lib \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/%{name} \ + -DCMAKE_SKIP_RPATH:BOOL=OFF \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ -DOCC_INCLUDE_DIR=%{_includedir}/opencascade \ -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 \ @@ -217,50 +208,30 @@ -DFREECAD_USE_EXTERNAL_SMESH=OFF \ .. -make VERBOSE=1 %{?_smp_mflags} all || make VERBOSE=1 all - -# # Build documentation last, somehow -# # this triggers a rebuild -# mkdir build_doc -# pushd build_doc -# cmake \ -# -DCMAKE_INSTALL_PREFIX=%%{_prefix} \ -# -DLIB_SUFFIX=%%{_lib} \ -# -DCMAKE_INSTALL_DATADIR=%%{_datadir}/%%{name} \ -# -DCMAKE_INSTALL_DOCDIR=%%{_docdir}/%%{name} \ -# -DCMAKE_INSTALL_INCLUDEDIR=%%{_includedir}/%%{name} \ -# -DCMAKE_BUILD_TYPE=Release \ -# -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \ -# -DFREECAD_USE_EXTERNAL_PIVY=TRUE \ -# ../ -# # Needs an updated opencascade -# #-DOCE_DIR=/opt/OpenCASCADE/%%{_lib} -# -# nice make VERBOSE=1 DevDoc -# popd +%cmake_build %install -pushd build -nice %make_install VERBOSE=1 %{?_smp_mflags} -popd - -# pushd build_doc -# nice make VERBOSE=1 %%{?_smp_mflags} install DESTDIR=%%{buildroot} -# popd +%cmake_install # Fix "non-executable-script" rpmlint warning chmod 755 %{buildroot}%{x_prefix}/Mod/Robot/MovieTool.py \ %{buildroot}%{x_prefix}/Mod/Test/testmakeWireString.py \ %{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 - -%suse_update_desktop_file -c %{name} "%{name}" "3D CAD Modeler" %{name} "freecad" Education Engineering +# Move icons, mimeinfo, metainfo to the correct location +mv %{buildroot}%{x_prefix}/share/* %{buildroot}%{_datadir}/ +for size in 64 48 32 16; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps + mv %{buildroot}%{_datadir}/%{name}/freecad-icon-${size}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/org.freecadweb.FreeCAD.png +done +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/ +# Install under the correct name according to FDO shared-mime-info-spec +mv %{buildroot}%{_datadir}/%{name}/freecad-doc.png %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/application-x-extension-fcstd.png +rm %{buildroot}%{_datadir}/%{name}/freecad.xpm +rm %{buildroot}%{_datadir}/%{name}/freecad.svg -# Install mime type -install -Dpm 0644 %{SOURCE3} %{buildroot}/usr/share/mime/packages/%{name}.xml +%suse_update_desktop_file -r org.freecadweb.FreeCAD Education Engineering # Remove unneeded files find %{buildroot} -type f -name "*.la" -delete -print @@ -280,26 +251,15 @@ # Link binaries mkdir -p %{buildroot}/usr/bin -%if 0%{?suse_version} >= 91330 -# disabled, hopefully not anymore needed -cp %{S:1} %{buildroot}/usr/bin/FreeCAD -chmod +x %{buildroot}/usr/bin/FreeCAD -cp %{S:2} %{buildroot}/usr/bin/FreeCADCmd -chmod +x %{buildroot}/usr/bin/FreeCADCmd -%else ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCAD ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCADCmd -%endif -%fdupes -s %{buildroot} +%fdupes %{buildroot}/%{_libdir} +%fdupes %{buildroot}/%{_datadir} + +%post -p /sbin/ldconfig -%post -/sbin/ldconfig -%mime_database_post - -%postun -/sbin/ldconfig -%mime_database_postun +%postun -p /sbin/ldconfig %files %license LICENSE @@ -308,8 +268,9 @@ %doc %{_docdir}/%{name}/ %{_libdir}/%{name} %{_datadir}/%{name}/ -%{_datadir}/mime/packages/%{name}.xml -%{_datadir}/pixmaps/freecad.xpm -%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/*/*/*.{png,svg} +%{_datadir}/metainfo/*.xml +%{_datadir}/mime/packages/*.xml %changelog ++++++ 0001-Fix-build-with-pyside2-shiboken2-5.12.1.patch ++++++ >From 7d362752633f0e47cebc44f52db8dffbc3b3c2e6 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux <[email protected]> Date: Thu, 13 Jun 2019 14:15:07 +0200 Subject: [PATCH] Fix build with pyside2/shiboken2 >= 5.12.1 Starting with 5.12.2, pyside2 and shiboken2 now create CMake build targets. The old variables were removed, leading to linker errors when building FreeCAD. --- src/Gui/CMakeLists.txt | 54 ++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 3bd96e0..93babc5 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -137,38 +137,46 @@ IF(OCULUS_FOUND) ) ENDIF(OCULUS_FOUND) -if(SHIBOKEN_INCLUDE_DIR) - if (BUILD_QT5) +if(BUILD_QT5) + if(Shiboken2_FOUND) add_definitions(-DHAVE_SHIBOKEN2) - else() + if("${Shiboken2_VERSION}" VERSION_GREATER 5.12.1) + list(APPEND FreeCADGui_LIBS Shiboken2::libshiboken) + else() + include_directories(${SHIBOKEN_INCLUDE_DIR}) + list(APPEND FreeCADGui_LIBS ${SHIBOKEN_LIBRARY}) + endif() + endif() + if(PySide2_FOUND) + add_definitions(-DHAVE_PYSIDE2) + if("${PySide2_VERSION}" VERSION_GREATER 5.12.1) + list(APPEND FreeCADGui_LIBS PySide2::pyside2) + # Needed to '#include pyside2_<module_name>_python.h' + get_target_property(PYSIDE_INCLUDE_DIR PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES) + else() + list(APPEND FreeCADGui_LIBS ${PYSIDE_LIBRARY}) + endif() + include_directories(${PYSIDE_INCLUDE_DIR}/QtWidgets) + endif() +else() + if(SHIBOKEN_INCLUDE_DIR) add_definitions(-DHAVE_SHIBOKEN) + include_directories(${SHIBOKEN_INCLUDE_DIR}) + list(APPEND FreeCADGui_LIBS ${SHIBOKEN_LIBRARY}) endif() - include_directories( - ${SHIBOKEN_INCLUDE_DIR} - ) - list(APPEND FreeCADGui_LIBS - ${SHIBOKEN_LIBRARY} - ) -endif(SHIBOKEN_INCLUDE_DIR) + if(PYSIDE_INCLUDE_DIR) + add_definitions(-DHAVE_PYSIDE) + list(APPEND FreeCADGui_LIBS ${PYSIDE_LIBRARY}) + endif() +endif() -if(PYSIDE_INCLUDE_DIR) +if(DEFINED PYSIDE_INCLUDE_DIR) include_directories( ${PYSIDE_INCLUDE_DIR} ${PYSIDE_INCLUDE_DIR}/QtCore ${PYSIDE_INCLUDE_DIR}/QtGui ) - list(APPEND FreeCADGui_LIBS - ${PYSIDE_LIBRARY} - ) - if (BUILD_QT5) - include_directories( - ${PYSIDE_INCLUDE_DIR}/QtWidgets - ) - add_definitions(-DHAVE_PYSIDE2) - else() - add_definitions(-DHAVE_PYSIDE) - endif() -endif(PYSIDE_INCLUDE_DIR) +endif() generate_from_xml(DocumentPy) generate_from_xml(PythonWorkbenchPy) -- 2.22.0 ++++++ 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 ++++++ 0003-qt-5.14.patch ++++++ commit 17ed2b196a58afbbc3cc1bb99f6eb76060171ad2 Author: howetuft <[email protected]> Date: Tue Dec 24 16:06:18 2019 +0100 [Cmake] Update FindPySide2Tools for PySide2 5.14 - issue #4229 Since PySide2 5.14, 'pyside2-rcc' and 'pyside2-uic' have been renamed into plain 'rcc' and 'uic'. This leads FindPySide2Tools.cmake to no longer find rcc/uic, as reported in bug #4229 (https://www.freecadweb.org/tracker/view.php?id=4229) and prevents compilation. FindPySide2Tools has been updated accordingly. diff --git a/cMake/FindPySide2Tools.cmake b/cMake/FindPySide2Tools.cmake index 9c9751488..7ca9690dc 100644 --- a/cMake/FindPySide2Tools.cmake +++ b/cMake/FindPySide2Tools.cmake @@ -20,8 +20,24 @@ if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR}) endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) -FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) +# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option +# We test Qt5Core version to act accordingly + +FIND_PACKAGE(Qt5Core) + +IF(Qt5Core_VERSION_STRING VERSION_GREATER_EQUAL 5.14) + # New (>= 5.14) + FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic) + set(UICOPTIONS "--generator=python") + FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc) + set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") +ELSE(Qt5Core_VERSION_STRING VERSION_LESS 5.14) + # Legacy (< 5.14) + FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) + FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) + set(UICOPTIONS "") + set(RCCOPTIONS "") +ENDIF(Qt5Core_VERSION_STRING VERSION_GREATER_EQUAL 5.14) MACRO(PYSIDE_WRAP_UI outfiles) FOREACH(it ${ARGN}) @@ -33,7 +49,7 @@ MACRO(PYSIDE_WRAP_UI outfiles) #) if(WIN32 OR APPLE) ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile} + COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile} MAIN_DEPENDENCY ${infile} ) else() @@ -41,7 +57,7 @@ MACRO(PYSIDE_WRAP_UI outfiles) # pyside2-uic generates in comments at beginning., which is why # we follow the tool command with in-place sed. ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}" + COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}" COMMAND sed -i "/^# /d" "${outfile}" MAIN_DEPENDENCY "${infile}" ) @@ -60,7 +76,7 @@ MACRO(PYSIDE_WRAP_RC outfiles) #) if(WIN32 OR APPLE) ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile} + COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile} MAIN_DEPENDENCY ${infile} ) else() @@ -68,7 +84,7 @@ MACRO(PYSIDE_WRAP_RC outfiles) # pyside-rcc generates in comments at beginning, which is why # we follow the tool command with in-place sed. ADD_CUSTOM_COMMAND(OUTPUT "${outfile}" - COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" + COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" COMMAND sed -i "/^# /d" "${outfile}" MAIN_DEPENDENCY "${infile}" ) ++++++ FreeCAD-0.18.1.obscpio -> FreeCAD-0.18.4.obscpio ++++++ /work/SRC/openSUSE:Leap:15.2/FreeCAD/FreeCAD-0.18.1.obscpio /work/SRC/openSUSE:Leap:15.2/.FreeCAD.new.2738/FreeCAD-0.18.4.obscpio differ: char 48, line 1 ++++++ FreeCAD.obsinfo ++++++ --- /var/tmp/diff_new_pack.XmdATD/_old 2020-05-12 11:42:28.093013419 +0200 +++ /var/tmp/diff_new_pack.XmdATD/_new 2020-05-12 11:42:28.093013419 +0200 @@ -1,5 +1,5 @@ name: FreeCAD -version: 0.18.1 -mtime: 1554385363 -commit: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40 +version: 0.18.4 +mtime: 1582676121 +commit: 783e1346c7a078f5265c3f0c6a927d09a8c1fe70 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.XmdATD/_old 2020-05-12 11:42:28.117013469 +0200 +++ /var/tmp/diff_new_pack.XmdATD/_new 2020-05-12 11:42:28.117013469 +0200 @@ -2,8 +2,8 @@ <service name="obs_scm" mode="disabled"> <param name="url">https://github.com/FreeCAD/FreeCAD.git</param> <param name="scm">git</param> - <param name="revision">0.18.1</param> - <param name="version">0.18.1</param> + <param name="revision">releases/FreeCAD-0-18</param> + <param name="version">0.18.4</param> </service> <service name="set_version" mode="disabled"/> ++++++ 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);
