Ultimaker / libArcus

Communication library between internal components for Ultimaker software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python: use PYQT_CONFIGURATION["sip_flags"]

rdieter opened this issue · comments

As demonstrated in downstream bug report,
https://bugzilla.redhat.com/show_bug.cgi?id=1601917
libArcus' python bindings do not use
PYQT_CONFIGURATION["sip_flags"]
as recommended by PyQt upstream. See ml threads,
https://www.riverbankcomputing.com/pipermail/pyqt/2018-August/040759.html
https://www.riverbankcomputing.com/pipermail/pyqt/2018-August/040771.html

I came up with an upstreamable patch,
https://src.fedoraproject.org/rpms/libarcus/blob/master/f/libArcus-3.4.1-sip_flags.patch

but unforuntately FindSIP.cmake has been refactored since, so that approach no longer applies (directly at least)

Without fixing this, libarcus is broken when using latest sip/pyqt5 releases (because it doesn't properly use/detect the required private copies of the sip python module)

It works still with SIP 4.19.3 and PyQt 5.11.2. PyQt is the latest stable release at the moment and SIP is just a few patch-releases behind (they are currently at 4.19.12 as of this writing). Which versions were you testing with?

I have a bit of a problem with the patch that you're providing since it introduces a dependency of libArcus on PyQt. You'd need to make and install PyQt before building libArcus.

The error in the mailing list threads you've posted has been prevented in Cura by importing Arcus before importing PyQt:

https://github.com/Ultimaker/Cura/blob/8298f76d91314fe3eda865859341c07000b6fb8d/cura_app.py#L133

That is also not a nice solution though.

As it stands now, the current solution of building libArcus with SIP flags from PyQt is not an accepted solution because it introduces a dependency of libArcus on PyQt, while not every application that uses libArcus will want to bring a large library like PyQt in.

I'll close it for now then. Hopefully we can find a better solution.