From 8e2ab9f76888ac4da971f9d5069cec7bcc2b572f Mon Sep 17 00:00:00 2001 From: looooo Date: Tue, 2 Jan 2024 23:03:27 +0100 Subject: [PATCH] set INSTALL_TO_SITEPACKAGES to ON by default and add some modules to the freecad-namespace (freecad.part, freecad.partdesign, freecad.sketcher) --- cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake | 2 +- src/Ext/freecad/CMakeLists.txt | 3 +++ src/Ext/freecad/part.py | 1 + src/Ext/freecad/partdesign.py | 1 + src/Ext/freecad/sketcher.py | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/Ext/freecad/part.py create mode 100644 src/Ext/freecad/partdesign.py create mode 100644 src/Ext/freecad/sketcher.py diff --git a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake index 9bd1ca2617..5f67283a7e 100644 --- a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake +++ b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake @@ -14,7 +14,7 @@ macro(InitializeFreeCADBuildOptions) option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF) option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF) option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON) - option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" OFF) + option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON) option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF) if (WIN32 OR APPLE) option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF) diff --git a/src/Ext/freecad/CMakeLists.txt b/src/Ext/freecad/CMakeLists.txt index 2fea55b9ac..8b4056d388 100644 --- a/src/Ext/freecad/CMakeLists.txt +++ b/src/Ext/freecad/CMakeLists.txt @@ -38,6 +38,9 @@ endif() INSTALL( FILES ${NAMESPACE_INIT} + part.py + partdesign.py + sketcher.py project_utility.py UiTools.py utils.py diff --git a/src/Ext/freecad/part.py b/src/Ext/freecad/part.py new file mode 100644 index 0000000000..4ea7ec6db9 --- /dev/null +++ b/src/Ext/freecad/part.py @@ -0,0 +1 @@ +from Part import * \ No newline at end of file diff --git a/src/Ext/freecad/partdesign.py b/src/Ext/freecad/partdesign.py new file mode 100644 index 0000000000..907f5f6237 --- /dev/null +++ b/src/Ext/freecad/partdesign.py @@ -0,0 +1 @@ +from PartDesign import * \ No newline at end of file diff --git a/src/Ext/freecad/sketcher.py b/src/Ext/freecad/sketcher.py new file mode 100644 index 0000000000..a742c8ecba --- /dev/null +++ b/src/Ext/freecad/sketcher.py @@ -0,0 +1 @@ +from Sketcher import * \ No newline at end of file