Bug report #11465

pyqtconfig deprecated => sip: Unable to find file "QtCore/QtCoremod.sip"

Added by Martin von Gagern almost 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
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

Description

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.

qgis-2.4.0-FindPyQt.patch Magnifier (2.01 KB) Martin von Gagern, 2014-10-22 10:51 AM

Associated revisions

Revision f4b3ad03
Added by Jürgen Fischer over 5 years ago

use PyQt4 where deprecated pyqtconfig is unavailable (fixes #10596 and fixes #11465)

Revision f213254f
Added by Jürgen Fischer over 5 years ago

debian packaging fix (fixes #11465)

Revision 97ace3cf
Added by Jürgen Fischer over 5 years ago

debian packaging fix (fixes #11465)

Revision dd8c99b5
Added by Jürgen Fischer over 5 years ago

use PyQt4 where deprecated pyqtconfig is unavailable (fixes #10596 and fixes #11465)

History

#1 Updated by marisn - almost 6 years ago

This patch is required to compile also current master (tested with f00db95 on ~AMD64 Gentoo).

#2 Updated by Donovan Cameron over 5 years ago

Is this a duplicate of the bug I posted at #10596 ?

#3 Updated by marisn - over 5 years ago

Donovan Cameron wrote:

Is this a duplicate of the bug I posted at #10596 ?

Seems so, still this one contains a woring patch. I wonder how it could slip past release with an existing patch...

#4 Updated by Jürgen Fischer over 5 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF