Porting to python3

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
bernd
Posts: 6142
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Porting to python3

Postby bernd » Mon Jun 11, 2018 6:49 pm

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

Re: Porting to python3

Postby mlampert » Mon Jun 11, 2018 7:52 pm

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
looo
Posts: 2005
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Postby looo » Mon Jun 11, 2018 8:28 pm

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
Posts: 4502
Joined: Wed Oct 22, 2014 5:02 pm

Re: Porting to python3

Postby sgrogan » Mon Jun 11, 2018 9:14 pm

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.
looo
Posts: 2005
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Postby looo » Tue Jun 12, 2018 7:15 am

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
Posts: 7332
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Postby triplus » Tue Jun 12, 2018 9:02 pm

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
Posts: 2988
Joined: Thu Jan 05, 2017 9:03 pm

Re: Porting to python3

Postby Kunda1 » 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?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
triplus
Posts: 7332
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Postby triplus » Tue Jun 12, 2018 9:21 pm

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

Re: Porting to python3

Postby sgrogan » Tue Jun 12, 2018 9:32 pm

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.
triplus
Posts: 7332
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Postby triplus » Tue Jun 12, 2018 9:37 pm

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).