Bug 337462 - CMake module fails to find PyQt
Summary: CMake module fails to find PyQt
Status: RESOLVED FIXED
Alias: None
Product: buildsystem
Classification: Developer tools
Component: KDE4 (cmake) (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-15 11:24 UTC by Andrea Scarpino
Modified: 2014-07-16 19:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2014-07-15 11:24:30 UTC
Since PyQt 4.10, PyQt.pyqtconfig is deprecated and not available unless PyQt is built using the old configure script.

The FindPyQt.py cmake module looks for pyqtconfig and then PyQt is not found even it's installed. This breaks PyKDE4 build and others.

See http://pyqt.sourceforge.net/Docs/PyQt4/build_system.html for more info.
Comment 1 Raphael Kubo da Costa 2014-07-16 19:49:26 UTC
Git commit a7e47438d4e3469dc9df70d613826cb360fc8d19 by Raphael Kubo da Costa.
Committed on 16/07/2014 at 19:29.
Pushed by rkcosta into branch 'KDE/4.14'.

Make FindPyQt4 work with PyQt's new build system.

Since PyQt 4.10, PyQt.pyqtconfig is deprecated and not available unless
PyQt is built using the old configure script.

There is no direct replacement for it, as PyQt's new build system does
not provide as much information as before by design. Luckily, most of
the variables we are interested in can be obtained from PyQt's QtCore
module itself even if its old build system is used.

The only exception is pyqt_sip_dir, which cannot be determined at all if
pyqtconfig is not available. In this case, the most we can do is guess
the default path like QScintilla2 does, and fail if it does not exist.
The user then needs to specify it manually via CMake with something like
-DPYQT4_SIP_DIR=/usr/share/sip/PyQt4. To this effect, all variables set
by FindPyQt4.cmake have been made cache variables, which means their
values can be overriden by the user, thus ignoring the contents read via
FindPyQt.py.
FIXED-IN: 4.14.0
REVIEW:   119302

M  +41   -17   cmake/modules/FindPyQt.py
M  +27   -9    cmake/modules/FindPyQt4.cmake

http://commits.kde.org/kdelibs/a7e47438d4e3469dc9df70d613826cb360fc8d19
Comment 2 Raphael Kubo da Costa 2014-07-16 19:59:33 UTC
Please note that while this fixes FindPyQt4.cmake, PyKDE still doesn't work with PyQt's new build system, as it expects pyqtconfig.py to be present.