Get 3rd party dependency version info via python?

Need help, or want to share a macro? Post here!
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Get 3rd party dependency version info via python?

Postby Kunda1 » Thu Oct 31, 2019 5:59 pm

How can I get the version info of the following depedencies via python?

OCC
Netgen
Vtk
graphviz
expat
coin
pivy
boost
netcdf
hdf5
eigen
xerces-c
ccx
gmsh
freetype
ifcopenshell
ifcplusplus
opencamlib
pysolar
orocos-kdl
pcl-pointcloud
paraview
libredwg
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get 3rd party dependency version info via python?

Postby Kunda1 » Sun Nov 03, 2019 12:09 pm

bump
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Syres
Posts: 383
Joined: Thu Aug 09, 2018 11:14 am

Re: Get 3rd party dependency version info via python?

Postby Syres » Sun Nov 03, 2019 1:00 pm

Kunda1 wrote:
Sun Nov 03, 2019 12:09 pm
bump
The best I can do @Kunda1 is point you in the direction of the CfdOF Check Dependencies section of CfdTools.py (so any thanks need to be sent in @oliveroxtoby direction), https://github.com/jaheyns/CfdOF/blob/m ... ls.py#L653

You'll notice down at line 801 Oliver has done the Paraview check but it would appear with all these external binaries it can be a bit messy being as polite as possible.
Hope that's of use.
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get 3rd party dependency version info via python?

Postby Kunda1 » Sun Nov 03, 2019 2:43 pm

Syres wrote:
Sun Nov 03, 2019 1:00 pm
The best I can do @Kunda1...
Thanks.
Looks like they're using the OpenFoam environment to primarily check the version of those dependencies. Nonetheless, this is useful.
Cheers!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
sgrogan
Posts: 5472
Joined: Wed Oct 22, 2014 5:02 pm

Re: Get 3rd party dependency version info via python?

Postby sgrogan » Tue Nov 05, 2019 11:26 pm

There is ThirdPartyLibraries.html in the doc directory.
There is some extended version info there.
In the Gui; Help > About FreeCAD > Libraries Tab
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get 3rd party dependency version info via python?

Postby Kunda1 » Wed Nov 06, 2019 4:37 pm

sgrogan wrote:
Tue Nov 05, 2019 11:26 pm
There is ThirdPartyLibraries.html in the doc directory.
There is some extended version info there.
In the Gui; Help > About FreeCAD > Libraries Tab
https://github.com/FreeCAD/FreeCAD/blob ... aries.html
looks like it's a static page. Doesn't pull version info, AFAICT.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
sgrogan
Posts: 5472
Joined: Wed Oct 22, 2014 5:02 pm

Re: Get 3rd party dependency version info via python?

Postby sgrogan » Wed Nov 06, 2019 10:16 pm

Kunda1 wrote:
Wed Nov 06, 2019 4:37 pm
looks like it's a static page. Doesn't pull version info, AFAICT.
I guess it doesn't come from the html, but the Library tab in the GUI gives some additional version info over the std_about (boost and zlib) don't know where it comes from.

Also remember this https://forum.freecadweb.org/viewtopic. ... 76#p187448
The script needs to be ported to PY3/QT5 and then get the clipboard into a list or something.
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get 3rd party dependency version info via python?

Postby Kunda1 » Fri Nov 08, 2019 9:03 pm

sgrogan wrote:
Wed Nov 06, 2019 10:16 pm
I guess it doesn't come from the html, but the Library tab in the GUI gives some additional version info over the std_about (boost and zlib) don't know where it comes from.

Also remember this https://forum.freecadweb.org/viewtopic. ... 76#p187448
The script needs to be ported to PY3/QT5 and then get the clipboard into a list or something.
Thanks!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
looo
Posts: 2959
Joined: Mon Nov 11, 2013 5:29 pm

Re: Get 3rd party dependency version info via python?

Postby looo » Fri Nov 08, 2019 10:08 pm

Some of the requested:

Code: Select all

>>> import pivy
>>> import vtk
>>> import ifcopenshell
>>> import ocl
>>>
>>> pivy.__version__
'0.6.5a3'
>>> vtk.vtkVersion.GetVTKSourceVersion().split(" ")[-1]
'8.2.0'
>>> ifcopenshell.version
0.6.0b0
>>> ocl.version()
'2019.07'
calculix, gmsh:

Code: Select all

>>> import subprocess as sub
>>> sub.run(["ccx", "-v"], stdout=sub.PIPE).stdout.decode("utf8").strip().split(" ")[-1]
'2.15'
>>> sub.run(["gmsh", "--version"], stderr=sub.PIPE).stderr.decode("utf8").strip()
'4.4.1'
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get 3rd party dependency version info via python?

Postby Kunda1 » Sat Nov 09, 2019 5:13 pm

Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features