[PyQt] SIP building of QtCoremod.sip

Emmanuel Mayssat emayssat at epicsqt.org
Fri Jul 25 07:25:37 BST 2014


To be better acquainted with SIP on large software project, I am trying to build the PyQt bindings that are already on my system.

$ pwd
/usr/share/sip/PyQt4/QtCore
$ ls
configure.py                  qfileinfo.sip              qpair.sip                      qstringmatcher.sip
qabstractanimation.sip        qfile.sip                  qparallelanimationgroup.sip    qstring.sip
qabstracteventdispatcher.sip  qfilesystemwatcher.sip     qpauseanimation.sip            qsystemsemaphore.sip
qabstractfileengine.sip       qfinalstate.sip            qpluginloader.sip              QtCoremod.sbf
qabstractitemmodel.sip        qfsfileengine.sip          qpoint.sip                     QtCoremod.sip
[...]


Now I am trying to build a configure.py file, with the following code

$ more configure.py 
import os
import sipconfig

# The name of the SIP build file generated by SIP and used by the build
# system.
build_file = "./sip.d/QtCoremod.sbf"

build_dir = "./sip.d"
specification_sip = "QtCoremod.sip"
platform = "WS_X11"

# Get the SIP configuration information.
config = sipconfig.Configuration()

# Run SIP to generate the code.
os.system("rm -rf ./sip.d")
os.mkdir("./sip.d")
os.system(" ".join([config.sip_bin, "-c", build_dir, "-b", build_file, "-t", platform, specification_sip ]))

# Create the Makefile.
makefile = sipconfig.SIPModuleMakefile(config, build_file)

# Add the library we are wrapping.  The name doesn't include any platform
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
# ".dll" extension on Windows).
makefile.extra_libs = ["QtCore"]

#look in the currents directory too for libraries
makefile.extra_lib_dirs = ["."]

# Generate the Makefile itself.
os.chdir(build_dir)
makefile.generate()


When I 'sudo python configure'.py'. there is no output (meaning probably it is successful since sip files are generated.
Nevertheless, when I run make -C ./sip.d, I get 

$ sudo make
g++ -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -fPIC -O2 -Wall -W -DNDEBUG -I. -I/usr/include/python2.7 -o sipQtCorecmodule.o sipQtCorecmodule.cpp
In file included from sipQtCorecmodule.cpp:29:0:
sipAPIQtCore.h:35:21: fatal error: QMetaType: No such file or directory
compilation terminated.
make: *** [sipQtCorecmodule.o] Error 1


!?!?!?
Is my configuration file ok?
Regards,
--
E
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140724/5f906fba/attachment-0001.html>


More information about the PyQt mailing list