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

Authored by lbartoletti on Dec 2 2021, 8:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 8:25 AM
Unknown Object (File)
Thu, Dec 26, 1:15 PM
Unknown Object (File)
Tue, Dec 24, 6:22 PM
Unknown Object (File)
Sun, Dec 22, 7:18 PM
Unknown Object (File)
Sun, Dec 22, 6:53 PM
Unknown Object (File)
Sun, Dec 22, 4:23 PM
Unknown Object (File)
Sat, Dec 21, 4:40 PM
Unknown Object (File)
Sat, Dec 21, 4:39 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

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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
214

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
20

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
20

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
20

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
20

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
20

Looks fine!

buildtools and qmake should probably be build-only dependencies.

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

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
  • fix pkg-plist: remove whitespace
  • reintroduce speech

You could consider adding a CHANGED entry.

devel/py-qt5-pyqt/pkg-plist
27

The plist substitution is too greedy in case of PYTHON_MAJOR_VER. It should be QtQuick3D.abi%%PYTHON_MAJOR_VER%%.so here, and similar fix is needed in other places - not sure I found all of them. I don't know to check for this automatically, considering we have only Python3 I suggest to remove PYTHON_MAJOR_VER at all.

349

one more incorrect %%PYTHON_MAJOR_VER%%

611

incorrect PYTHON_MAJOR_VER

958

PYTHON_MAJOR_VER or plain 3 should be here? I have no idea.

  • fix PYTHON_MAJ_VER in pkg-plist

portmgr doesn't own those Mk parts

  • move UPDATING text to CHANGES and fix UPDATING
This revision was not accepted when it landed; it landed in state Needs Review.Apr 18 2022, 4:51 PM
This revision was automatically updated to reflect the committed changes.