5

EDIT: The following buildout.cfg worked to build Qt, PyQt, and SIP


[buildout]
parts =
    pyqt

[pyqt]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.4.tar.gz
#shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options = --confirm-license
    -q ${qt:location}/bin/qmake
    -b ${buildout:parts-directory}/pyqt/bin
    -p ${buildout:parts-directory}/pyqt/plugins
    -d ${buildout:parts-directory}/pyqt/lib/
    -v ${sip:location}/share
    --verbose
environment =
    PYTHONPATH=${sip:location}/lib


[sip]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.3.tar.gz
# shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options = 
    -b ${buildout:parts-directory}/sip/bin
    -e ${buildout:parts-directory}/sip/include
    -d ${buildout:parts-directory}/sip/lib
    -v ${buildout:parts-directory}/sip/share

[qt]
recipe = zc.recipe.cmmi
url = http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz
shared = True
Doran
  • 3,801
  • 2
  • 24
  • 40

1 Answers1

2

I suspect you need to tell the PyQT configure where to find the sip libraries and include headers:

[pyqt]
recipe = zc.recipe.cmmi
url = http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.4.tar.gz
# shared = True
source-directory-contains = configure.py
configure-command = ${buildout:executable} ./configure.py
configure-options = --confirm-license
    -b ${buildout:parts-directory}/pyqt/bin
    -p ${buildout:parts-directory}/pyqt/plugins
    -d ${buildout:parts-directory}/pyqt/lib/
    -q ${qt:location}/bin/qmake
    -v ${sip:location}/share
    --verbose
environment =
    PYTHONPATH=${sip:location}/lib

Updated: Update my answer to include the PYTHONPATH environment var so configure.py will load the correct sipconfig module.

Martijn Pieters
  • 889,049
  • 245
  • 3,507
  • 2,997
  • Sorry, then I am out of ideas; I see the ./configure.py command has a `-w` (or `--verbose`) commandline switch, where it'll spit out everything it finds; you may want to try that and see if you can gain any more insights. – Martijn Pieters May 27 '11 at 20:07
  • The problem with the configure.py command for pyqt is that it immediately fails even outside of buildout. I can't even print help without receiving that error. – Doran May 27 '11 at 20:22
  • That's a problem indeed! Try and make it work outside of buildout (only build the sip part with `bin/buildout install sip`) first. Also, do not use `python ./configure.py` but rather `${buildout:executable} ./configure.py` to re-use the python used to run buildout. I've updated my answer (however wrong) to reflect this. – Martijn Pieters May 27 '11 at 20:40
  • aHA! I see that configure.py imports sipconfig. I bet you have sip installed in your system path and that'll always interfere. Use a python virtualenv instead or set PYTHONPATH to point to the ${si:location}/lib location (or wherever it stores sipconfig. – Martijn Pieters May 27 '11 at 20:44
  • Yes, PYTHONPATH was the problem. – Doran May 31 '11 at 14:49