Porting to python3

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Porting to python3

Post by bernd »

mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Porting to python3

Post by mlampert »

triplus wrote: Mon Jun 11, 2018 1:32 pm P.S. We could i guess be more aggressive and flip the Py3 flags on for Trusty builds. And let that propagate to AppImage. If we decide and do that Py3 related reports will for sure start to come after.
+1
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

triplus wrote:To be honest it's working out without the mentioned feature being available. Sure. It would be great to have that in the future. But highly likely we aren't talking about a deal breaker.
the bundled conda-packages for FreeCAD are huge.
triplus wrote:I see. Adding the Conda instructions here would therefore make some sense?
docs? Yes absolutely necessary, but first I need to work on the "never ending todo list".
triplus wrote:P.S. We could i guess be more aggressive and flip the Py3 flags on for Trusty builds. And let that propagate to AppImage. If we decide and do that Py3 related reports will for sure start to come after.
+1
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Porting to python3

Post by sgrogan »

triplus wrote: Mon Jun 11, 2018 5:51 am
mlampert wrote: Mon Jun 11, 2018 5:39 am Is there a quick intro on how to "build" FC from source for python3 ?
On Ubuntu 16.04 (where Py2 is set as default):

Py3.png
I also need to set boost-python
https://forum.freecadweb.org/viewtopic. ... 50#p178969
looo wrote: Mon Jun 11, 2018 12:14 pm yes I know this problem. Maybe @sgrogan knows whats wrong here. Maybe it's to due some patching? Is git necessary in build and run environment?
Git needs to be available only when Cmake is run.
looo wrote: Mon Jun 11, 2018 8:28 pm the bundled conda-packages for FreeCAD are huge.
I was/am working on an update scheme with my builds using Conda as a dependency package manager
https://forum.freecadweb.org/viewtopic.php?f=4&t=27514
There is a package available on the releases page https://forum.freecadweb.org/viewtopic.php?f=4&t=27514

There are no recent updates because I am having trouble compiling, right now my problem is with pybind11 in CMake.
triplus wrote: Mon Jun 11, 2018 1:32 pm P.S. We could i guess be more aggressive and flip the Py3 flags on for Trusty builds. And let that propagate to AppImage. If we decide and do that Py3 related reports will for sure start to come after.
I can build an 14.04 x86_64 on my PPA https://launchpad.net/~clhclh/+archive/ ... /+packages
But this breaks the i386 build.
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

sgrogan wrote:Git needs to be available only when Cmake is run.
hmm somehow, I removed this dependency. I guess this was the problem. Hopefully the next build will be fixed.
sgrogan wrote: There are no recent updates because I am having trouble compiling, right now my problem is with pybind11 in CMake.
Can you post the error? For conda I am using now external smesh and pybind11 as new dependencies. Both are available from conda-forge channel. Also there is a bug in cmake 3.11 so better use 3.10.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Post by triplus »

sgrogan wrote: Mon Jun 11, 2018 9:14 pm I can build an 14.04 x86_64 on my PPA https://launchpad.net/~clhclh/+archive/ ... /+packages
But this breaks the i386 build.
And how much extra work does that come down to on your side (PPA maintenance)? That is if we decide and try to reuse it to provide additional daily Py3 and 64-bit oriented AppImage from it?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Porting to python3

Post by Kunda1 »

@sgrogan Question: What about creating an appImage that is Py3/Qt5 enabled and that way folks could quickly test without needing to compile themselves?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Post by triplus »

Qt5 on Trusty is too old to be useful. And there is no PySide2 in the repositories.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Porting to python3

Post by sgrogan »

triplus wrote: Tue Jun 12, 2018 9:02 pm And how much extra work does that come down to on your side (PPA maintenance)? That is if we decide and try to reuse it to provide additional daily Py3 and 64-bit oriented AppImage from it?
Not much at all for 14.04 x86_64
I think it's a start.
My goal is a FreeCAD-testing FreeCAD PPA where we can work on the PY3/QT5/External SMSH ports. A lot will depend on Kurt's GSoC work.
Maybe you could try the package in a 14.04 virtual machine? If you have the time. There is still work to do, but I think it is worth it.
Kunda1 wrote: Tue Jun 12, 2018 9:17 pm @sgrogan Question: What about creating an appImage that is Py3/Qt5 enabled and that way folks could quickly test without needing to compile themselves?
I can't even do a QT5 build locally yet, so this will take some time. we're gonna have to package a bunch of stuff on the PPA to get QT5 working for all the supported releases. Again Kurt's work will be foundational.
"fight the good fight"
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Post by triplus »

OK then i will try to create an AppImage from it (likely tomorrow) and see how that goes. Maybe i will take a look in the delta updates possibility (if it won't turn out to be too complex).
Post Reply