ubuntu and python3-pyside2uic

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

ubuntu and python3-pyside2uic

Post by bernd »

here https://wiki.freecadweb.org/Compile_on_ ... _3_and_Qt5 it says package python3-pyside2uic is needed to compile on ubuntu but there is no such package on ubuntu ...

https://packages.ubuntu.com/search?keyw ... ection=all
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ubuntu and python3-pyside2uic

Post by sgrogan »

For Ubuntu 18.04 get it from the FreeCAD-daily PPA
For Ubuntu 20.04 see here: https://forum.freecadweb.org/viewtopic. ... 20#p395462
"fight the good fight"
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu and python3-pyside2uic

Post by wmayer »

For Ubuntu Bionic there are no official packages for PySide2. I had to install it from a PPA and the package is called pyside2-tools.

When checking the official pyside2-tools for Ubuntu Focal then it lacks of the uic or rcc tools. It only provides pyside2-lupdate.
I haven't found any package that provides a uic for Python but I can imagine that this is not needed any more and possibly Qt's uic is able to produce Python code too as PySide is now officially supported by Qt.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu and python3-pyside2uic

Post by wmayer »

This is the source code of uic and here is an option to generate Python code from a ui file:
https://github.com/qt/qtbase/blob/dev/s ... n.cpp#L140
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: ubuntu and python3-pyside2uic

Post by bernd »

thanks guys.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ubuntu and python3-pyside2uic

Post by sgrogan »

wmayer wrote: Mon Oct 19, 2020 4:57 pm When checking the official pyside2-tools for Ubuntu Focal then it lacks of the uic or rcc tools. It only provides pyside2-lupdate.
I haven't found any package that provides a uic for Python
For Focal(20.04) Kurt is using python3-pyqt5 and patching FreeCAD for the daily PPA.
https://packages.ubuntu.com/focal/amd64 ... 5/filelist
https://salsa.debian.org/science-team/f ... ontrol#L54
https://salsa.debian.org/science-team/f ... ide2.patch

I think this is specific to QT5.14 and in QT5.15 it will be fixed https://doc.qt.io/qtforpython/tutorials ... files.html
"fight the good fight"
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu and python3-pyside2uic

Post by wmayer »

OK, thanks for the hints.
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: ubuntu and python3-pyside2uic

Post by kkremitzki »

Unfortunately the Ubuntu 20.04 release people took my experimental pyside2 package out of Debian Experimental even though it wasn't ready due to this change regarding rcc and uic :cry: Basically pyside2uic and pyside2rcc binaries' functionality was moved to Qt5's uic and rcc binaries, but the version of Qt 5 in 20.04 is too old for this feature. However it's possible to use the binaries from pyqt5-dev-tools in lieu of pyside2 for this purpose.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ubuntu and python3-pyside2uic

Post by sgrogan »

kkremitzki wrote: Mon Oct 19, 2020 10:46 pm Basically pyside2uic and pyside2rcc binaries' functionality was moved to Qt5's uic and rcc binaries
Thanks, this speaks to what wmayer was saying. So in the future FreeCAD will need to be ported to use QT's native uic?
And this will be packaged with QT somewhere?
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: ubuntu and python3-pyside2uic

Post by kkremitzki »

sgrogan wrote: Mon Oct 19, 2020 10:53 pm
kkremitzki wrote: Mon Oct 19, 2020 10:46 pm Basically pyside2uic and pyside2rcc binaries' functionality was moved to Qt5's uic and rcc binaries
Thanks, this speaks to what wmayer was saying. So in the future FreeCAD will need to be ported to use QT's native uic?
And this will be packaged with QT somewhere?
It's already been taken care of in cMake/FindPySide2Tools.cmake, if the Qt version is new enough it's just a matter of using rcc --generator=python instead of pyside2-rcc, same for uic and pyside2-uic. And on Debian/Ubuntu the necessary Qt package is qtbase5-dev-tools, version 5.14 minimum.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
Post Reply