manage python dependencies

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
Post Reply
User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

manage python dependencies

Post by sgrogan » Wed Feb 05, 2020 12:05 am

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.
"fight the good fight"

vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: manage python dependencies

Post by vocx » Wed Feb 05, 2020 5:46 am

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.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.

User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

Re: manage python dependencies

Post by sgrogan » 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.
"fight the good fight"

triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: manage python dependencies

Post by triplus » Wed Feb 05, 2020 11:32 pm

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.

vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: manage python dependencies

Post by vocx » Thu Feb 06, 2020 12:05 am

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.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.

Post Reply