[PyQt] problem using SIP on Windows Vista 64 bit

Quoc Tran g7quoc at hotmail.com
Mon Jan 7 21:30:43 GMT 2008


Hi,

I am using PyQt on Vista 64 bit. I managed to successfully compile Python2.5, Qt4.3.3, SIP4.7.3 and PyQt4.3.3 using MSVC2005. Everything works great so far and now I'm trying to use SIP to create PyQt extensions and am running into problems.

I can successfully use SIP to create a non Qt C++ extension. I was able to get the "word" example in the SIP docs to work after creating a word.lib.

I'm having trouble using SIP to generate a Qt extension. I tried the "hello" example in the SIP docs and ran into several problems which I tried to hack around. Here's what I did:

1) >python configure.py
Traceback (most recent call last):
  File "configure.py", line 15, in <module>
    qt_sip_flags = config.pyqt_qt_sip_flags
  File "C:\Python25\Lib\site-packages\sipconfig.py", line 183, in __getattr__ raise AttributeError, "\"%s\" is not a valid configuration value or user option" % name
AttributeError: "pyqt_qt_sip_flags" is not a valid configuration value or user option

    -I looked at C:\Python25\Lib\site-packages\PyQt4\pyqtconfig.py and there is no "pyqt_qt_sip_flags" defined but there is "pyqt_sip_flags" so I replaced it.

2) >python configure.py
sip: C:\Python25\sip\PyQt4/qt/qtmod.sip:1: A %CompositeModule cannot be %Imported
Traceback (most recent call last):
  File "configure.py", line 32, in <module>
    makefile = pyqtconfig.QtModuleMakefile(
AttributeError: 'module' object has no attribute 'QtModuleMakefile'

    -commented out the first line of qtmod.sip beginning with %CompositeModule and that problem went away. Not sure why SIP doesn't like %CompositeModule or if commenting out this line will be a problem.
    -I looked at pyqtconfig.py and there is no 'QtModuleMakefile' defined but there is 'QtGuiModuleMakefile' so I replaced it.


3) >python configure.py
sip: hello.sip:7: Lower bound is not a time version
Error: Unable to open "hello.sbf": [Errno 2] No such file or directory: 'hello.sbf'

    -In hello.sip replaced Qt_3_0_0 with Qt_4_3_3

4) >python configure.py
Now SIP simply crashes with the Windows popup "sip.exe has stopped working".

    -To fix the crash I commented out the following in Qtmod.sip since I only need the core gui stuff:
//%CompositeModule PyQt4.Qt

%Include QtCore/QtCoremod.sip
%Include QtGui/QtGuimod.sip
//%Include QtNetwork/QtNetworkmod.sip
//%Include QtOpenGL/QtOpenGLmod.sip
//%Include QtScript/QtScriptmod.sip
//%Include QtSql/QtSqlmod.sip
//%Include QtSvg/QtSvgmod.sip
//%Include QtTest/QtTestmod.sip
//%Include QtXml/QtXmlmod.sip
//%Include QtAssistant/QtAssistantmod.sip
//%Include QtDesigner/QtDesignermod.sip

5) >python configure.py
sip: No %Module has been specified for module defined in C:\Python25\sip\PyQt4/qt/qtmod.sip
Error: Unable to open "hello.sbf": [Errno 2] No such file or directory: 'hello.sbf'


At this point I'm stuck. Any idea what I'm doing wrong?

Thanks!

QT

_________________________________________________________________
Exercise your brain! Try Flexicon!
http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080107/51a19406/attachment-0001.html


More information about the PyQt mailing list