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

List:       pykde
Subject:    [PyKDE] SIP and PyQT with debugging symbols
From:       Fredrik Juhlin <laz () strakt ! com>
Date:       2002-08-14 12:31:29
[Download RAW message or body]

Hi!

As a part of an effort to build a "debug environment", I've made patches
that allows building SIP and PyQT with debugging info by supplying an
argument to the respective build.py script. I'm attaching the relevant
patches, in case they are of interest.

//Fredrik

["pyqt_debug.patch" (pyqt_debug.patch)]

diff -ru PyQt-3.3.2-orig/build.py PyQt-3.3.2/build.py
--- PyQt-3.3.2-orig/build.py	2002-07-12 15:04:53.000000000 +0200
+++ PyQt-3.3.2/build.py	2002-08-14 13:46:56.000000000 +0200
@@ -74,6 +74,7 @@
     print "    -q dir         the Qt base directory [default %s]" % (platQTDIRName)
     print "    -s dir         the directory containing the SIP module"
     print "    -w             enable the use of Python 1.5.x under Windows"
+    print "    -o             Build with debugging symbols"
 
     sys.exit(rcode)
 
@@ -129,7 +130,7 @@
     """
     global platMake, platCopy, platPyScriptDir, platPyDLLDir, platPySiteDir
     global platPyIncDir, platPyLib, platQTDIRName, platBinDir, platMkdir
-    global modDir, pyFullVers, sipIncDir
+    global modDir, pyFullVers, sipIncDir, debugMode
 
     pyFullVers = string.split(sys.version)[0]
 
@@ -170,6 +171,7 @@
 
     modDir = platPySiteDir
     sipIncDir = platPyIncDir
+    debugMode = 'release'
 
 
 def escape(s):
@@ -850,7 +852,7 @@
     runProgram(sipBin,argv)
 
     # Python names binary modules differently on different platforms.
-    global proPatches, makefilePatches
+    global proPatches, makefilePatches, debugMode
 
     target = mname + "c"
 
@@ -868,7 +870,8 @@
     olddir = pushDir(mname)
 
     proPatches["TARGET"] = [re.compile("@BL_TARGET@",re.M), target]
-
+    proPatches["DEBUG"] = [re.compile("@BL_DEBUG@",re.M), debugMode]
+    
     global catCppFiles
     buildMakefile(pro,catCppFiles)
 
@@ -1085,11 +1088,11 @@
     initGlobals()
 
     try:
-        optlist, args = getopt.getopt(argv[1:],"ha:b:cd:e:g:i:l:m:p:q:s:w")
+        optlist, args = getopt.getopt(argv[1:],"ha:b:cd:e:g:i:l:m:p:q:s:wo")
     except getopt.GetoptError:
         usage()
 
-    global makeBin, platBinDir, qtLib, qpeTag
+    global makeBin, platBinDir, qtLib, qpeTag, debugMode
 
     explicitMake = 0
 
@@ -1135,6 +1138,8 @@
         elif opt == "-w":
             global enableOldPython
             enableOldPython = 1
+        elif opt == "-o":
+            debugMode = "debug"
 
     installChecks()
     maindir = mkTempBuildDir()
diff -ru PyQt-3.3.2-orig/sip/qtcanvasmod.sip PyQt-3.3.2/sip/qtcanvasmod.sip
--- PyQt-3.3.2-orig/sip/qtcanvasmod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qtcanvasmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -86,7 +86,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtglmod.sip PyQt-3.3.2/sip/qtglmod.sip
--- PyQt-3.3.2-orig/sip/qtglmod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qtglmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -86,7 +86,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtmod.sip PyQt-3.3.2/sip/qtmod.sip
--- PyQt-3.3.2-orig/sip/qtmod.sip	2002-07-12 15:04:53.000000000 +0200
+++ PyQt-3.3.2/sip/qtmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -264,7 +264,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtnetworkmod.sip PyQt-3.3.2/sip/qtnetworkmod.sip
--- PyQt-3.3.2-orig/sip/qtnetworkmod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qtnetworkmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -90,7 +90,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtpemod.sip PyQt-3.3.2/sip/qtpemod.sip
--- PyQt-3.3.2-orig/sip/qtpemod.sip	2002-07-12 15:04:53.000000000 +0200
+++ PyQt-3.3.2/sip/qtpemod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -100,7 +100,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtsqlmod.sip PyQt-3.3.2/sip/qtsqlmod.sip
--- PyQt-3.3.2-orig/sip/qtsqlmod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qtsqlmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -103,7 +103,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qttablemod.sip PyQt-3.3.2/sip/qttablemod.sip
--- PyQt-3.3.2-orig/sip/qttablemod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qttablemod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -86,7 +86,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 
diff -ru PyQt-3.3.2-orig/sip/qtxmlmod.sip PyQt-3.3.2/sip/qtxmlmod.sip
--- PyQt-3.3.2-orig/sip/qtxmlmod.sip	2002-07-12 15:04:54.000000000 +0200
+++ PyQt-3.3.2/sip/qtxmlmod.sip	2002-08-14 13:46:31.000000000 +0200
@@ -95,7 +95,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG += qt warn_off release dll @BL_THREAD@
+CONFIG += qt warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_MODULE_DLL @BL_DEFINES@
 

["sip_debug.patch" (sip_debug.patch)]

diff -ru sip-3.3.2-orig/build.py sip-3.3.2/build.py
--- sip-3.3.2-orig/build.py	2002-07-12 15:04:08.000000000 +0200
+++ sip-3.3.2/build.py	2002-08-14 13:34:53.000000000 +0200
@@ -61,6 +61,7 @@
     print "    -q dir         the Qt base directory [default %s]" % (platQTDIRName)
     print "    -w             enable the use of Python 1.5.x under Windows"
     print "    -x             disable Qt support"
+    print "    -o             Build with debugging symbols"
 
     sys.exit(rcode)
 
@@ -115,7 +116,7 @@
     """Sets the values of globals that need more than a simple assignment.
     """
     global platMake, platCopy, platPySiteDir, platPyIncDir, platPyLib
-    global platQTDIRName, platBinDir, modDir, pyFullVers
+    global platQTDIRName, platBinDir, modDir, pyFullVers, debugMode
 
     pyFullVers = string.split(sys.version)[0]
 
@@ -147,6 +148,7 @@
 
     modDir = platPySiteDir
 
+    debugMode = 'release'
 
 def escape(s):
     """Escape all the backslashes (usually Windows directory separators) in a
@@ -748,11 +750,11 @@
     initGlobals()
 
     try:
-        optlist, args = getopt.getopt(argv[1:],"hb:d:g:i:l:m:q:wx")
+        optlist, args = getopt.getopt(argv[1:],"hb:d:g:i:l:m:q:wxo")
     except getopt.GetoptError:
         usage()
 
-    global makeBin, platBinDir
+    global makeBin, platBinDir, debugMode
 
     explicitMake = 0
 
@@ -789,6 +791,8 @@
         elif opt == "-x":
             global qtVersion
             qtVersion = -1
+        elif opt == '-o':
+            debugMode = 'debug'
 
     installChecks()
     maindir = mkTempBuildDir()
@@ -808,6 +812,8 @@
 
     proPatches["TARGET"] = [re.compile("@BL_TARGET@",re.M), target]
 
+    proPatches["DEBUG"] = [re.compile("@BL_DEBUG@", re.M), debugMode]
+
     inform("Creating SIP code generator Makefile.")
     olddir = pushDir("sipgen")
     buildMakefile("sipgen.pro")
diff -ru sip-3.3.2-orig/siplib/siplib.pro sip-3.3.2/siplib/siplib.pro
--- sip-3.3.2-orig/siplib/siplib.pro	2002-07-12 15:04:09.000000000 +0200
+++ sip-3.3.2/siplib/siplib.pro	2002-08-14 11:11:26.000000000 +0200
@@ -40,7 +40,7 @@
 TEMPLATE = lib
 TARGET = @BL_TARGET@
 DESTDIR = @BL_DESTDIR@
-CONFIG = @BL_CFG_QTSUPPORT@ warn_off release dll @BL_THREAD@
+CONFIG = @BL_CFG_QTSUPPORT@ warn_off @BL_DEBUG@ dll @BL_THREAD@
 INCLUDEPATH = @BL_INCLUDEPATH@
 DEFINES = SIP_MAKE_DLL @BL_DEFINES@
 

_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde

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

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