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

List:       pykde
Subject:    [PyQt] bug in pyqt's configure.py
From:       Mathias.Born () gmx ! de
Date:       2013-01-21 23:11:07
Message-ID: 1412949566.20130122001107 () gmx ! de
[Download RAW message or body]

Hi,

In the latest snapshot (PyQt-win-gpl-snapshot-4.10-f0118624625e.zip),
I noticed an error in its configure.py when run on Python 3.3.

lines 1925 to 1931 read:

        # Qt5 doesn't have the 'default' link.
        if not os.path.isdir(fname):
            f = get_command_stdout(opts.qmake + " -query QMAKE_SPEC")
            fname = f.read().strip()
            f.close()

            fname = os.path.join(qt_datadir, "mkspecs", fname)

The problem here is that

            fname = f.read().strip()

creates a byte array, not a string, which makes

            fname = os.path.join(qt_datadir, "mkspecs", fname)

fail, because qt_datadir is a string.


These possible fixes come to my mind:

(1) Just add "decode" to the reading:

             fname = f.read().strip().decode()

(2) Change function "get_command_stdout" in line 1401:

    p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
            stdout=subprocess.PIPE, stderr=stderr, env=env, universal_newlines=True)

  However, this most likely will break other parts.


Best Regards,
Mathias Born


_______________________________________________
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