I'd strongly suggest/urge to not include third party packages in your own package/namespace, especially when the fix is so simple.
Naming clashes are pretty annoying and both the debugging of strange errors as well as the loss of independence is not a useful thing to spend your time on.
If we include the functions, variables, ... from FreeCAD.so (dll) inside of the __init__.py of the freecad namespace, then this could be a problem. But not if we make the FreeCAD.so available via freecad.app. This way we can restrict the freecad namespace as a pure "namespace" and everything added to this namespace are packages. With this a freecad-directory for FreeCAD is the same as a python-directory is for python (eg. site-packages). This is a directory only containing packages.
As I already mentioned, this would be the import structure:
Code: Select all
import FreeCAD as App -> from freecad import app
import FreeCADGui as Gui -> from freecad import gui
import Part -> from freecad import part
import Fem -> from freecad import fem
The other option would be to have the FreeCAD.so directly available via freecad.
And there your suggestion to have a second layer make sense.
Code: Select all
import FreeCAD as App -> import freecad as app
import FreeCADGui as Gui -> from freecad import gui
import Part -> from freecad import part
import Fem -> from freecad import fem