[PyKDE] PyQt4 logic in PyQt3's configure.py

Giovanni Bajo rasky at develer.com
Fri Dec 16 14:50:38 GMT 2005


Hello Phil,

configure.py into PyQt3 snapshot is as follows:

# Try and find a Qt installation to use as the default.  First look for Qt
v4
# by looking for the first qmake on the path.  If this fails then check the
# QTDIR environment variable for an earlier version of Qt.
try:
    path = os.environ["PATH"]
except KeyError:
    path = ""

for d in path.split(os.pathsep):
    if os.access(os.path.join(d, "qmake"), os.X_OK):
        qt_dir = os.path.dirname(d)
        break
else:
    try:
        qt_dir = os.environ["QTDIR"]
    except KeyError:
        qt_dir = ""


Why should this configure.py use logic to find out Qt4, if it's a PyQt3
snapshot? In my tests under Linux, it fails to configure properly because it
detects a PyQt4 installation and tries to use it for PyQt3. I tried removing
the part that looks for "qmake" in the path and just use the QTDIR env, and
it works correctly.
-- 
Giovanni Bajo




More information about the PyQt mailing list