Search found 62 matches

by simonvanderveldt
Sat Apr 01, 2017 9:24 pm
Forum: Developers corner
Topic: Text output (mainly stderr) from macros
Replies: 30
Views: 5764

Re: Text output (mainly stderr) from macros

IMHO having multiple places where output can go (Report View and Python console) is pretty confusing. Honestly I don't understand why the Report View exists. If a piece of software has a console I expect to see all of it's output to go there, with maybe the option to show/hide certain types of messa...
by simonvanderveldt
Sat Apr 01, 2017 8:56 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

I also think adding two layers is adding a layer of confusion more. As there is now the possibility to use name-space packages, it's possible to extend a module itself. So I don't see the need for the modules-layer. I added the modules sub-package for two reasons, both of them stemming from the sam...
by simonvanderveldt
Sat Apr 01, 2017 8:20 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

But FreeCAD consists of more than just FreeCAD modules, these items need a place as well, which would logically be the `freecad` parent package. Could you give an example of such item. Do we have them yet. Or we could have them in the future but don't have them ATM. Honestly, I could use an archite...
by simonvanderveldt
Sat Apr 01, 2017 7:52 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

Worked great. You can try to install the template-extension I have made. It's uploaded to pypi. It adds a new workbench to freecad. Documentation is in the REDME pip install template-extension Awesome! I don't know if one already existed but an example/skeleton extension is a good thing to have! I'...
by simonvanderveldt
Fri Mar 31, 2017 6:22 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

distutils/setuptools can not install two extensions to the same place. Tried this with this template https://github.com/looooo/TemplateExtension . Once calling pip with this extension my previously installed package is gone. ps.: my fault. I used the same name in the setup step. So pip removed the ...
by simonvanderveldt
Thu Mar 30, 2017 9:05 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

I don't think this will work without the pkgutil.extend_path in python3. At least in my case this was necessary. With python3 it's not necessary to place a __init__.py in the extern freecad.modules (eg in site-package/freecad/modules/test/__init__.py). Maybe that is needed with python2. With Python...
by simonvanderveldt
Thu Mar 30, 2017 8:15 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

ps.: Maybe I was wrong. Placing the extend_path in both directories (freecad, freecad.modules) work for extending the __path__ of freecad.modules. So in this situation we can extend both directories extern. The question is, do we really need the "modules" dir. I would vote against because...
by simonvanderveldt
Thu Mar 30, 2017 2:29 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

Did you pick these two commits? Or the older ones: - https://github.com/simonvanderveldt/Fre ... 777c61f9d7 - https://github.com/simonvanderveldt/Fre ... a807728c43 And do you have any code in the different init files? exactly. This two files + the line I have mentioned above. the init files have o...
by simonvanderveldt
Thu Mar 30, 2017 11:37 am
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

Exactly. Is there anything different with py3? I'd expect not really, but since I haven't tried can't guarantee it. Is FreeCAD master already compatible with Python3? Then I can start trying it. Did you pick these two commits? Or the older ones: - https://github.com/simonvanderveldt/FreeCAD/commit/...
by simonvanderveldt
Thu Mar 30, 2017 11:06 am
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 151
Views: 26741

Re: Subfolder for Python modules

I have cherry picked your two commits regarding the namespace-support. There was also one line from the arch-commit necessary to make FreeCAD start: https://github.com/simonvanderveldt/FreeCAD/blob/namespace-modules/src/CMakeLists.txt#L8 Now I added a directory ..../lib/python3.5/site-packages/free...