[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] SIP building of QtCoremod.sip
From:       Emmanuel Mayssat <emayssat () epicsqt ! org>
Date:       2014-07-25 6:25:37
Message-ID: BLU173-W180438467A7460A01C776BD9FC0 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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
 		 	   		  


[Attachment #5 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>To be better acquainted with SIP on large \
software project, I am trying to build the PyQt bindings that are already on my \
system.<br><br>$ pwd<br>/usr/share/sip/PyQt4/QtCore<br>$ \
ls<br>configure.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qfileinfo.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qpair.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qstringmatcher.sip<br>qabstractanimation.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qfile.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qparallelanimationgroup.sip&nbsp;&nbsp;&nbsp; \
qstring.sip<br>qabstracteventdispatcher.sip&nbsp; \
qfilesystemwatcher.sip&nbsp;&nbsp;&nbsp;&nbsp; \
qpauseanimation.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qsystemsemaphore.sip<br>qabstractfileengine.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qfinalstate.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qpluginloader.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
QtCoremod.sbf<br>qabstractitemmodel.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qfsfileengine.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qpoint.sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
QtCoremod.sip<br>[...]<br><br><br>Now I am trying to build a configure.py file, with \
the following code<br><br>$ more configure.py <br>import os<br>import \
sipconfig<br><br># The name of the SIP build file generated by SIP and used by the \
build<br># system.<br>build_file = "./sip.d/QtCoremod.sbf"<br><br>build_dir = \
"./sip.d"<br>specification_sip = "QtCoremod.sip"<br>platform = "WS_X11"<br><br># Get \
the SIP configuration information.<br>config = sipconfig.Configuration()<br><br># Run \
SIP to generate the code.<br>os.system("rm -rf \
./sip.d")<br>os.mkdir("./sip.d")<br>os.system(" ".join([config.sip_bin, "-c", \
build_dir, "-b", build_file, "-t", platform, specification_sip ]))<br><br># Create \
the Makefile.<br>makefile = sipconfig.SIPModuleMakefile(config, build_file)<br><br># \
Add the library we are wrapping.&nbsp; The name doesn't include any platform<br># \
specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the<br># ".dll" \
extension on Windows).<br>makefile.extra_libs = ["QtCore"]<br><br>#look in the \
currents directory too for libraries<br>makefile.extra_lib_dirs = ["."]<br><br># \
Generate the Makefile \
itself.<br>os.chdir(build_dir)<br>makefile.generate()<br><br><br>When I 'sudo python \
configure'.py'. there is no output (meaning probably it is successful since sip files \
are generated.<br>Nevertheless, when I run make -C ./sip.d, I get <br><br>$ sudo \
make<br>g++ -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
-fstack-protector --param=ssp-buffer-size=4&nbsp; -m64 -mtune=generic -fPIC -O2 -Wall \
-W -DNDEBUG -I. -I/usr/include/python2.7 -o sipQtCorecmodule.o \
sipQtCorecmodule.cpp<br>In file included from \
sipQtCorecmodule.cpp:29:0:<br>sipAPIQtCore.h:35:21: fatal error: QMetaType: No such \
file or directory<br>compilation terminated.<br>make: *** [sipQtCorecmodule.o] Error \
1<br><br><br>!?!?!?<br>Is my configuration file ok?<br>Regards,<br>--<br>E<br> 		 	   \
</div></body> </html>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic