Skip to content

Commit

Permalink
Add freecad.modules namespace package
Browse files Browse the repository at this point in the history
To enable the use of regular Python packages as FreeCAD modules and enabling third parties to
easily add FreeCAD modules
  • Loading branch information
simonvanderveldt committed Mar 30, 2017
1 parent 6e55a7a commit a14fa27
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -5,6 +5,7 @@ add_subdirectory(Base)
add_subdirectory(App)
add_subdirectory(Main)
add_subdirectory(Mod)
add_subdirectory(freecad)
if(BUILD_GUI)
add_subdirectory(Gui)
configure_file(Doc/freecad.qhc ${CMAKE_BINARY_DIR}/doc/freecad.qhc COPYONLY)
Expand Down
4 changes: 4 additions & 0 deletions src/freecad/CMakeLists.txt
@@ -0,0 +1,4 @@

INSTALL(FILES "__init__.py" DESTINATION "Mod/freecad/")

add_subdirectory(modules)
2 changes: 2 additions & 0 deletions src/freecad/__init__.py
@@ -0,0 +1,2 @@
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
2 changes: 2 additions & 0 deletions src/freecad/modules/CMakeLists.txt
@@ -0,0 +1,2 @@

INSTALL(FILES "__init__.py" DESTINATION "Mod/freecad/modules/")
2 changes: 2 additions & 0 deletions src/freecad/modules/__init__.py
@@ -0,0 +1,2 @@
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)

0 comments on commit a14fa27

Please sign in to comment.