Page 1 of 1

manage python dependencies

Posted: Wed Feb 05, 2020 12:05 am
by sgrogan
Picked up from here:
https://forum.freecadweb.org/viewtopic. ... 50#p366388

What is on the wish list?
We have lots of partial solutions/workarounds.
If we can define what we want for functionality maybe we can come up with a roadmap. At the least we could come up with a GSoC project. At best we could use/organize some of what we have.

For an effort like this, I would propose that PY2 can be ignored.

Re: manage python dependencies

Posted: Wed Feb 05, 2020 5:46 am
by vocx
sgrogan wrote: Wed Feb 05, 2020 12:05 am ...
If we can define what we want for functionality maybe we can come up with a roadmap.
...
Related: Steal the plugins system from QGIS for the macro loader

We need to manage Python dependencies whatfor? (1) For the base FreeCAD system or (2) for addons? An addon is either a macro or a workbench.

What is the problem currently? I am not aware of a serious problem with handling dependencies, so I need concrete examples of something that is not working well. I mostly use Draft and Arch so I don't feel we require many dependencies here. Do Path, FEM, or external workbenches struggle with their Python dependencies? Which ones? Why?

The Ubuntu FreeCAD package already includes dependencies on installation so most Python packages are easy to install through apt or through pip.

When it comes to addons, I don't think the proper thing to do is to download the dependencies without telling the user. This is maybe possible if the Addon Manager becomes just an interface for pip, but we can only achieve this once every addon is converted to a pip-installable "new style" workbench.

Re: manage python dependencies

Posted: Wed Feb 05, 2020 11:22 pm
by sgrogan
maybe a Mod can merge this thread with https://forum.freecadweb.org/viewtopic.php?f=10&t=43095
Sorry I didn't see it before opening this thread.

Re: manage python dependencies

Posted: Wed Feb 05, 2020 11:32 pm
by triplus
vocx wrote: Wed Feb 05, 2020 5:46 am What is the problem currently? I am not aware of a serious problem with handling dependencies, so I need concrete examples of something that is not working well.
In short, there is a whole universe of potential libraries out there, a fraction of them is included in our binaries. If any FreeCAD module developer decides to use one of the dependencies, not currently provided in our binaries, well the potential problems, satisfying dependencies (platform dependent), usually begin from that point on. Some problems are easily solvable, by using solutions such as PIP, and some are not. Such threads are therefore more related to this last part, can we do more, to mitigate such potential problems or not, and how. Some therefore working on further extending FreeCAD capabilities, to work with such potential solutions.

Re: manage python dependencies

Posted: Thu Feb 06, 2020 12:05 am
by vocx
sgrogan wrote: Wed Feb 05, 2020 11:22 pm maybe a Mod can merge this thread with https://forum.freecadweb.org/viewtopic.php?f=10&t=43095
Sorry I didn't see it before opening this thread.
Personally, I would like to keep the threads separate. That one is specifically about adopting the QGIS manager.

This thread is a more general discussion from the point of view of FreeCAD.