[PyQt] Wrong Qt include paths when building PyQt

Josh jknox at irobot.com
Fri Dec 11 20:15:57 GMT 2009


I'm having a problem building PyQt 4.6.2 against local builds of Qt4.6.0 
and SIP 4.9.3.
Basically the includes paths in the calls to g++ point to the wrong place.

I have my build of Qt in /home/me/qt4.

I try to build PyQt, pointing it to my Qt's qmake:

    python configure.py -q /home/me/qt4/bin/qmake

It eventually fails due to not being able to find headers:

    In file included from sipQtCorecmodule.cpp:34:
    sipAPIQtCore.h:40:21: error: QMetaType: No such file or directory
    In file included from sip/QtCore/qobject.sip:560,
                     from sipQtCorecmodule.cpp:34:
    /home/me/PyQt-x11-gpl-4.6.2/qpy/QtCore/qpycore_api.h:36:28: error:
    QCoreApplication: No such file or directory
    /home/me/PyQt-x11-gpl-4.6.2/qpy/QtCore/qpycore_api.h:37:19: error:
    QString: No such file or directory
    /home/me/PyQt-x11-gpl-4.6.2/qpy/QtCore/qpycore_api.h:38:20: error:
    QVariant: No such file or directory

I noticed this in the build output:

    Qt v4.6.0 free edition is being used.
    SIP 4.9.3 is being used.
    The Qt header files are in /usr/include/qt4.
    The shared Qt libraries are in /usr/lib.
    The Qt binaries are in /usr/bin.
    The Qt mkspecs directory is in /usr/share/qt4.

and ended up with these include paths in the calls to g++:

        -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore 

All the references to /usr/* are incorrect. They should refer to 

Anyone know what I'm missing? Is there a straightforward way to get the 
include paths to be correct?
I've been stuck on this all day. :( Figured I'd check here before doing 
some heinous hacks.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091211/e69d9052/attachment-0001.html

More information about the PyQt mailing list