Page MenuHomeFreeBSD

PyQT update to 5.15.6 and "simplify" it. SIP update to 6.5.0 and reintroduce SIP4 for cura and its dependencies.
Needs ReviewPublic

Authored by lbartoletti on Dec 2 2021, 8:50 PM.

Details

Summary

This PR proposes the update of the latest versions of PyQT/SIP and what goes with it.

Sip

As mentioned in the update from sip to sip5, this is a transitional version to remove what is deprecated in sip4.
Sip6 completely removes the deprecated parts.
We have already made the effort to support updates to sip >= 5.
Just like the different software have integrated these changes to support the current versions of sip or to offer an option to choose one or the other version.

Unfortunately, cura and its dependencies don't seem to want to update [1], and I reintroduced sip4 just for them; this is what is done in the others having cura :/

PyQt

At the same time, I took the opportunity to simplify PyQT.
We are the only ones to offer such a separate installation (except sub-package).
I used the some the logic as some other linux distributions like Arch to propose only one PyQT package (what we do today for devel/pyside2) now named devel/py-qt5-pyqt.
This allows us to be in adequacy with the packages that the author of these libraries proposes, namely:

PyQt - devel/py-qt5-pyqt
PyQt-3D – not in ports
PyQt-Charts - x11-toolkits/py-qt5-chart
PyQt-DataVisualization – not in ports
PyQt-NetworkAuth – net/py-qt5-networkauth
PyQt-Purchasing – not in ports
PyQt-WebEngine – www/py-qt5-webengine
SIP – devel/py-sip
py-sip - devel/py-qt5-sip
PyQt-builder - devel/py-qtbuilder
pyqtdeploy – not in ports
Qscintilla - devel/py-qt5-qscintilla2

The disadvantage of this method is that if you are a user of a tool that requires only a single dependency like py-qt5-core or py-qt5-widgets, you will pull all the dependencies from Qt5.
However, this has to be put into perspective because only two are concerned (devel/py-qstylizer and dns/knock [2]). The others already have substantial dependencies.

Detailled actions

  • rm of all */py-qt5-* but a few ports and create devel/py-qt5-pyqt
  • Add a dedicated MASTER_SITES for py-qt5-webengine
  • Update SIP to 6.3.1, qtbuilder to 1.12.0
  • Simplify PyQt, There is only 4 values : pyqt5 chart networkauth and webengine
  • ${SIP} is now bin/sip-build-${PYTHON_VER}
  • adapt all ports to USE_PYQT= pyqt5 instead of USE_PYQT= core gui svg etc.
  • reintroduce sip4 only for Ultimaker ports (libsavitar, libArcus, pynest2d and Cura)
  • devel/git-cola : fix pkg-plist issue. Don’t know if it’s related to sip or the ports is broken.
  • science/py-veusz : update to 3.4 and remove SIP patches (fixed upstream)
    1. PyQt
  • use new pyproject and new sip to build the ports
  • ex- pyqt5-core remove useless PyQt5,Qt patch.
  • ex- pyqt5-core remove configure patch : not needed since now PyQt5 is not separated. BTW use the option --protected-is-public instead of patch the port.
  • net/py-qt5-networkauth, www/py-qt5-webengine and x11-toolkits/py-qt5-chart use “PYQT_DIST build system”
  • remove Api option (installed by default)
  • www/qutebrowser : update options
  • Install dist-info (maybe required by some ports)

sip4 / cura

  • devel/libSavitar update to 4.11.0 and add BUILD_DEPENDS to sip4
  • devel/py-pynest2d update to 4.12.1, remove patches included upstream and add BUILD_DEPENDS to sip4
  • net/libarcus update to 4.12.1, remove patches included upstream and add BUILD_DEPENDS to sip4

[1] https://github.com/Ultimaker/libSavitar/pull/26#issuecomment-734223225
[2] and maybe remove pyqt option since there is a mention that “pyqt:5 isn't used”

Test Plan
  • Poudriere 13 amd64
  • exp-run: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260279
  • Test ports at runtime
  • Test conflicts for sip4/sip6. I installed graphics/qgis and cad/cura with devel/py-sip and devel/py-sip4
  • Test flavors (poudriere ... - i devel/py-qt5@all and python3.x from PyQt5 import QtCore; QtCore.QT_VERSION_STR)
  • Test regression for pyqt (there are patches for webengine, still needed?)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 43759
Build 40647: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
arrowd added inline comments.
devel/py-qt5-pyqt/Makefile
26

This seems to repeat the do-build from Mk/Uses/pyqt.mk. Why redefine this?

devel/py-qt5-pyqt/Makefile
26

I have to add "--confirm-license", but maybe It could be moved with a condition in Mk/Uses/pyqt.mk

lbartoletti added inline comments.
devel/py-qt5-pyqt/Makefile
26
makc added inline comments.
Mk/Uses/pyqt.mk
213

I'd hide this PLIST_SUB behind PYQT_DIST, otherwise it may cause a lot of false makeplist substitutions for pyqt consumers.

audio/picard/Makefile
29–30

Please, remove PLAYER

www/qutebrowser/Makefile
31–34

Please, check this change

I'm very much in favor of this simplification.

Mk/Uses/pyqt.mk
154–155

^ small question to the removal here -- as you are well aware (as you are also working on it :P ), we will be importing Qt6 really soonish [tm] -- aren't we going to add this removed if again then in a >5 version?

devel/py-sip4/Makefile
2

^ *cough*

5

^ why not use pyqt.mk to define this version -- so we have one place for all variable data -- also DISTVERSION?

7

^ remove comment

59

I wonder whether those two compileall.py statements could/should be integrated into python.mk -- unrelated to this though :)

devel/py-sip4/pkg-descr
1

A bit on the short side.

Looks like a very good idea, so I agree.

lbartoletti marked 4 inline comments as done.
  • remove PLAYER option
  • apply tcb reviews for sip4

Nice work!

devel/libsavitar/Makefile
17–18

Nitpick but Porters Handbook suggests 8 chars (Example 18. Using USE_GITHUB When Upstream Does Not Use Versions) however this port should be fine using "Example 17. Use of USE_GITHUB with DISTVERSIONPREFIX" instead as far as I can tell?

Run-tested this with devel/tortoisehg. Seems to be working fine.

btw, science/scidavis is missing - the only port that has optional dependence on pyqt.

  • fix science/scidavis: one more with sip4
In D33237#752751, @makc wrote:

btw, science/scidavis is missing - the only port that has optional dependence on pyqt.

Fixed with sip4. I grep'ed ports with PYQT, but scidavis used "pyqt"

  • fix graphics/qgis-ltr: use sip4 and add a patch to FindSIP to force detection of SIP4 instead of SIP6
lbartoletti added inline comments.
devel/libsavitar/Makefile
17–18

Right! Fixed.

lbartoletti marked 2 inline comments as done.
  • devel/libsavitar: remove useless GH_TAGNAME
  • move PLIST_SUB into PYQT_DIST ifdef
Mk/Uses/pyqt.mk
213

Done. Thanks

  • fix graphics/qgis-ltr: use sip4 and add a patch to FindSIP to force detection of SIP4 instead of SIP6

Thanks for the changes to graphics/qgis-ltr. Now, with SIP4, it builds and installs fine!

Thanks for your work! Regarding games/anki the port builds, runs fine and the transition via pkg upgrade went smoothly.

devel/py-qt5-pyqt/Makefile
19

I think it shouldn't pull everything from Qt5. Definitely various qt tools are not needed as runtime deps for pyqt, and also qt plugins including qt5-sqldrivers-*.

missing ports, that need conversion:

deskutils/py-autokey
graphics/partio
graphics/seexpr
math/py-matplotlib2

  • fix latest ports
  • fix graphics/seexpr: use sip4
devel/py-qt5-pyqt/Makefile
19

Hmmm, but if I split it, we're going back to the original state, aren't we? Is there a cleaner way (yes the subpackage, but even if it is possible, it is not in poudriere)?

devel/py-qt5-pyqt/Makefile
19

No, I do not suggest to spit it back. My point is that PyQt is mainly a wrapper around Qt libraries, not all of Qt. The PyQt port should depend on all required Qt components, but not on all Qt ports. For example, after this update I now have all of qt5-sqldrivers-* packages with corresponding database ports (firebird25, postgresql, etc) installed, also qt5-examples, qt5-l10n, qt5-pixeltool, etc, which are not used by anything. I suggest to explicitly set USE_QT to what PyQt needs itself.

devel/py-qt5-pyqt/Makefile
19

So, if I'm not wrong. PyQT, will need:
buildtools core dbus declarative designer gui help imageformats location multimedia network opengl printsupport qmake quick3d remoteobjects sensors serialport sql svg testlib webchannel webkit websockets widgets xml xmlpatterns

All USE_QT from py-qt5-* ports except x11-toolkits/py-qt5-chart, net/py-qt5-networkauth and www/py-qt5-webengine

Is it ok for you?

Thanks

devel/py-qt5-pyqt/Makefile
19

Looks fine!

buildtools and qmake should probably be build-only dependencies.

lbartoletti added inline comments.
devel/py-qt5-pyqt/Makefile
19

Ok. With this “reduced” list, only QtBluetooth, QtNfc and QtX11Extras disappear from the list of python packages (and which were not present today).

lbartoletti marked an inline comment as done.
  • minimalize QT5 dependencies
  • add qmake BUILD_DEPENDS
  • reinstate QtConnectivity and QtX11extras ok makc@ on IRC