From 7de7b162afd06e36bbdbc84a0f5f49932771d069 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 19 Dec 2017 09:12:26 +0100 Subject: 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 --- build/qt5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build/qt5.py') 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) -- cgit v1.2.3