install multiple version of a workbench

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
bernd
Posts: 7739
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

install multiple version of a workbench

Postby bernd » Fri Jun 14, 2019 1:11 pm

What is the best way to install multiple versions of a workbench? The problem is all directories are added to Path. Thus there are all modules twice. Something is needed to say from which directory to import.

bernd
chrisb
Posts: 15779
Joined: Tue Mar 17, 2015 9:14 am

Re: install multiple version of a workbench

Postby chrisb » Fri Jun 14, 2019 8:15 pm

I think used to have in the pre-0.17 era the manually installed workbenches in the macro directory. You can use different config files and configure different macro directories.
chrisb
Posts: 15779
Joined: Tue Mar 17, 2015 9:14 am

Re: install multiple version of a workbench

Postby chrisb » Fri Jun 14, 2019 8:59 pm

I just tested it and it works. You need a Mod directory in the Macro directory, below that you place your workbenches.
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: install multiple version of a workbench

Postby triplus » Sat Jun 15, 2019 9:00 am

I don't know which import style you use and there are some differences regarding Py2/Py3. But regardless of all that in the end you likely won't be able to use the same import statement for both modules. One will for example need to have an additional suffix, such as NameDev.py or name_dev.py. This therefore isn't all that much FreeCAD related, this is Python related.
looo
Posts: 2549
Joined: Mon Nov 11, 2013 5:29 pm

Re: install multiple version of a workbench

Postby looo » Sat Jun 15, 2019 6:06 pm

In python virtual envs are the way to test different versions of the same packages.
User avatar
bernd
Posts: 7739
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: install multiple version of a workbench

Postby bernd » Sat Jun 15, 2019 11:39 pm

thanks for all the answers
cron