CMake: Read PYQT_VERSION from PyQt5.QtCore
Needs ReviewPublic

Authored by rbreu on Mar 24 2019, 6:48 PM.


Group Reviewers

This is a bit cleaner, since that's where PYQT_VERSION, PYQT_VERSION_STR, and PYQT_CONFIGURATION are actually defined, see:

BUG: 405796

Diff Detail

R37 Krita
No Linters Available
No Unit Test Coverage
Build Status
Buildable 10065
Build 10083: arc lint + arc unit
rbreu created this revision.Mar 24 2019, 6:48 PM
Restricted Application added a reviewer: Krita. · View Herald TranscriptMar 24 2019, 6:48 PM
Restricted Application added a project: Krita. · View Herald Transcript
rbreu requested review of this revision.Mar 24 2019, 6:48 PM

Just to note: on OSX install both imports PyQt5.Qt and PyQt5.Qt yield the same result. This problably means that there will probably be no issues with this patch.

pyqt 5.12.1
sip 4.19.15

After last night's test, I can say this is not the fix to the pyqt situation on Windows.

That bug should be fixed with R37:331beffd5332.

This change might still be worth considering. I don't have any comments on it though.

rbreu added a comment.Mar 27 2019, 7:53 PM

Seeing that this would be importing the attributes from where they are documented to be found, and seeing how we've established that this works on several platforms, I'd like to push this anyway.

rempt added a subscriber: rempt.Mar 29 2019, 9:01 AM

I wouldn't mind, but I'm still having problems actually building PyQt support --

Traceback (most recent call last):

File "/home/boud/dev/krita/cmake/modules/", line 5, in <module>
  import PyQt5.QtCore

So there still is something weird going on in our build scripts or the FindPyQt5.cmake file.

rempt added a comment.Wed, Jan 29, 1:05 PM

Heh, I was actually googling on how to get the PYQT_VERSION now we've updated to a newer PyQt... But even with these changes, I still get:

  • Found SIP version: 4.19.15

Traceback (most recent call last):

File "C:/dev/krita/cmake/modules/", line 5, in <module>
  import PyQt5.QtCore

ImportError: DLL load failed while importing QtCore: The specified module could not be found.

import PyQt5.Qt does succeed, though...

Maybe there's something wrong with my paths. PyQt was installed to


and Python was installed to