diff options
author | Uwe Klotz <uwe_klotz@web.de> | 2017-11-15 22:15:08 +0100 |
---|---|---|
committer | Uwe Klotz <uwe_klotz@web.de> | 2017-11-16 07:25:36 +0100 |
commit | 3d49037c844e4a37493729388a07d3cc95c24e3d (patch) | |
tree | ea05322643770b0b132e62c44c3b5d75b0ff6cfa /build | |
parent | e87c3318c035a7420b3be3f61f53500d5a99546a (diff) |
Decode subprocess output from bytes to str
Diffstat (limited to 'build')
-rw-r--r-- | build/depends.py | 4 | ||||
-rw-r--r-- | build/qt5.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/build/depends.py b/build/depends.py index 65e25481f3..2798869eeb 100644 --- a/build/depends.py +++ b/build/depends.py @@ -215,9 +215,9 @@ class Qt(Dependence): import subprocess try: if qt5: - core = subprocess.Popen(["pkg-config", "--variable=libdir", "Qt5Core"], stdout = subprocess.PIPE).communicate()[0].rstrip() + core = subprocess.Popen(["pkg-config", "--variable=libdir", "Qt5Core"], stdout = subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding).rstrip() else: - core = subprocess.Popen(["pkg-config", "--variable=libdir", "QtCore"], stdout = subprocess.PIPE).communicate()[0].rstrip() + core = subprocess.Popen(["pkg-config", "--variable=libdir", "QtCore"], stdout = subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding).rstrip() finally: if os.path.isdir(core): return core diff --git a/build/qt5.py b/build/qt5.py index 37ccb012c7..2469a7c603 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].decode(sys.stdout.encoding).rstrip() 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].decode(sys.stdout.encoding).rstrip() finally: pass return QT5LIBDIR, QT5INCDIR, os.path.join(QT5INCDIR,module) |