diff options
author | Olaf Hering <olaf@aepfle.de> | 2017-12-19 09:12:26 +0100 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2017-12-19 09:12:26 +0100 |
commit | 7de7b162afd06e36bbdbc84a0f5f49932771d069 (patch) | |
tree | cead2b76ab0370f89f5f1085838dadef0be51f82 | |
parent | b2df4fb8a01939e16dde289503e0ba166c20ccdd (diff) |
build: decode bytes into strings in _find_qtdirs
Python3 is picky about byte vs. str variables. From their docs:
...
communicate() returns a tuple (stdout_data, stderr_data). The data will
be strings if streams were opened in text mode; otherwise, bytes.
...
The value returned by _find_qtdirs() is 'bytes', it is later used
together with 'str'. Python3 rejects a mixture of 'byte' and 'str'.
Change the return value to return type 'str'.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
-rw-r--r-- | build/qt5.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/qt5.py b/build/qt5.py index 50fcbd433a..674abef60a 100644 --- a/build/qt5.py +++ b/build/qt5.py @@ -550,9 +550,9 @@ def _find_qtdirs(qt5dir, module): else: module5 = module if not os.path.isdir(QT5LIBDIR): - QT5LIBDIR = subprocess.Popen(["pkg-config", "--variable=libdir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip() + QT5LIBDIR = subprocess.Popen(["pkg-config", "--variable=libdir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip().decode() if not os.path.isdir(QT5INCDIR): - QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip() + QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip().decode() finally: pass return QT5LIBDIR, QT5INCDIR, os.path.join(QT5INCDIR,module) |