[PyKDE] Passing -spec to qmake

Albert Chin pykde at lists.thewrittenword.com
Tue Nov 4 18:47:00 GMT 2003


On Tue, Nov 04, 2003 at 01:39:12PM +0000, Phil Thompson wrote:
> On Tuesday 04 November 2003 1:29 pm, Albert Chin wrote:
> > How about a way to pass the -spec [arg] command-line flag to build.py
> > in sip/pyqt? We build Qt with the vendor C++ compiler to /opt/libqt32
> > and then with GCC to /opt/libqt32/[include,lib]/gcc32. Without -spec,
> > we cannot build sip/PyQT against /opt/libqt32/[include,lib]/gcc32
> > (requires the [platform]-g++ specs file).
> 
> The new build system (currently being finished) will allow you to do this.

We have a local patch for build.py to better honor -r.

-- 
albert chin (china at thewrittenword.com)

--snip snip
--- build.py.orig	Sat Sep  6 08:36:35 2003
+++ build.py	Mon Nov  3 16:32:34 2003
@@ -381,6 +381,7 @@
 DEFINES = @BL_DEFINES@
 SOURCES = qttest.cpp
 LIBS += @TEST_QUILIB@ @TEST_SCILIBDIR@
+QMAKE_LIBDIR_QT = @QMAKE_LIBDIR_QT@
 
 win32:LIBS += @BL_PYLIB@
 """)
@@ -692,6 +693,7 @@
     if sys.platform == "win32" and usingTmake:
         makefilePatches["QTLIB"] = [re.compile("qt.lib",re.M), lib]
 
+    proPatches["LIBDIR"] = [re.compile("@QMAKE_LIBDIR_QT@",re.M), qtlibdir]
 
 def installChecks():
     """Carry out basic checks about the installation.
@@ -1183,6 +1160,16 @@
             makefilePatches["TARGET"] = [re.compile(target + "\\.dll",re.M), target + ".pyd"]
         else:
             target = target + "module"
+
+    # Specify Qt library directory
+    if qtLibDir:
+        qtlibdir = qtLibDir
+    else:
+        qtlibdir = qtDir + os.sep + "lib"
+
+    fi = open(mname + "/" + pro + ".in","a")
+    fi.write("QMAKE_LIBDIR_QT = " + qtlibdir + "\n")
+    fi.close()
 
     # Generate the Makefile.
     inform("Generating the Makefile for the %s module." % (mname))




More information about the PyQt mailing list