Here's a patch to get pyqt to build with qt 4.2.0.

Matt
--- sip-snapshot-20060930/siputils.py	2006-10-04 19:30:44.000000000 -0700
+++ siputils.py	2006-10-05 11:36:29.000000000 -0700
@@ -1984,10 +1984,35 @@
 
             orides[name] = prefix + oride[val_start:]
 
-    try:
-        f = open(filename, "r")
-    except IOError, detail:
-        error("Unable to open %s: %s" % (filename, detail))
+    class qmake_build_file_reader:
+        def __init__(self,filename):
+            self.filename = filename
+            self.path = os.path.dirname(filename)
+            self.filestack = []
+            self.pathstack = []
+            self.openfile(filename)
+        def openfile(self,filename):
+            try:
+                self.currentfile = open(filename,"r")
+                self.filestack.append(self.currentfile)
+                self.pathstack.append(self.path)
+                self.path = os.path.dirname(filename)
+            except IOError, detail:
+                error("Unable to open %s: %s" % (filename, detail))
+        def readline(self):
+            line = self.currentfile.readline()
+            if line.startswith('include('):
+                nextfile = os.path.normpath(os.path.join(self.path, line[8:-2]))
+                #print "Descending into include file", nextfile
+                self.openfile(nextfile)
+                return self.readline()
+            if not line and self.filestack:
+                self.currentfile = self.filestack.pop()
+                self.path = self.pathstack.pop()
+                return self.readline()
+            return line
+
+    f = qmake_build_file_reader(filename)
 
     # Get everything into a dictionary.
     raw = {
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to