GSoC '18: CM Project Thread

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: GSoC '18: CM Project Thread

Postby triplus » Sat Aug 18, 2018 11:45 am

kkremitzki wrote:
Wed Aug 15, 2018 11:12 pm
In short, libpyside2-dev and libshiboken2-dev provide a Python 2 CMake config file at, e.g. /usr/lib/x86_64-linux-gnu/cmake/PySide2-5.11.0/PySide2Config-python2.7.x86_64-linux-gnu.cmake but no corresponding Python 3 file. So, the usual way of doing a Python 3 build, by setting PYTHON_BASENAME etc., results in an error because it makes the build try to look for that missing Python 3 file.
As we discussed in this thread indeed without taking any special care library mismatch could and did occur in the past:

https://forum.freecadweb.org/viewtopic. ... 10#p250025

In general i got the feeling the main problem is related to maintaining compatibility matrix. If default interpreter on a system is Py2 likely Py3(Qt5) builds will take slightly more effort. As all defaults are geared towards using Py2. Once default interpreter on Ubuntu will be Py3. Likely it will be slightly easier to create Py3(Qt5) FreeCAD builds. And Py2 builds will need some CMake tweaking. Anyway the mentioned PPA:

https://launchpad.net/~thopiekar/+archi ... pyside-git

Providing PySide2 actually defaults to Py3:

https://forum.freecadweb.org/viewtopic. ... 25#p208325

It provides CMake files for both Py2/Py3 on mentioned location (/usr/lib/x86_64-linux-gnu/cmake). You could use it as a reference and look for clues. There for example is a conditional statement in PySide2Config.cmake defaulting to Py3 unless PYTHON_BASENAME is set to something else. Contacting Thomas Karl Pietrowski (PPA owner) and asking for help likely makes much sense too. In addition if you will determine something is a upstream bug and not a packaging issue. It makes sense to report it. I tried that procedure for some missing methods and they resolved it in a day.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: GSoC '18: CM Project Thread

Postby NormandC » Sun Aug 19, 2018 3:59 pm

Congrats Kurt, heck of a job you did! :)

Keep it up :D