Bug report #11465
pyqtconfig deprecated => sip: Unable to find file "QtCore/QtCoremod.sip"
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19740|
As initially reported on Gentoo, Current versions of QGIS (namely 2.4.0) fail to install with some configurations of recent PyQt4 (in my case PyQt4-4.11.2). The actual error message in this case reads like this:
sip: Unable to find file "QtCore/QtCoremod.sip"
The actual cause is most likely this other error message, printed during configuration:
Traceback (most recent call last): File "…/qgis-2.4.0/cmake/FindPyQt.py", line 5, in <module> import PyQt4.pyqtconfig ImportError: No module named pyqtconfig
The reason behind this is the fact that according to the PyQt docs the
pyqtconfig module has been deprecated and won't be built if the package is configured with the
configure-ng.py script instead of the legacy
configure.py script. The
FindPyQt.py script in QGIS starts out by importing that module, so it fails pretty fast.
I don't know exactly how to retrieve all the information that script obtained without using
pyqtconfig. But for some settings I found ways to obtain the same settings, or at least make educated guesses which work in default configurations. I wrote that up in a patch which allows my build to succeed. That patch currently makes use of the
sipconfig module, which apparently is destined to go away in SIP version 5, but that hasn't been released yet, so for the time being we can accept that requirement for now.