summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2019-08-23 14:51:06 +0200
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2019-08-23 14:51:06 +0200
commit5209ff7a2231175518d43e064c425b3efb4ea15e (patch)
tree211d65db54a5669079aee2adde6211271f655548
parent71b2374d9c080a1a1a71f8040a0c41a6fd8bf000 (diff)
scons: Also fix Python 2.7 compatibility in depends.py/qt5.py
-rw-r--r--build/depends.py4
-rw-r--r--build/qt5.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/build/depends.py b/build/depends.py
index 5b7f636dd0..bf81d20cb8 100644
--- a/build/depends.py
+++ b/build/depends.py
@@ -202,11 +202,11 @@ class Qt(Dependence):
pkg_config_cmd = ['pkg-config', '--variable=libdir', 'Qt5Core']
try:
output = subprocess.check_output(pkg_config_cmd)
- except FileNotFoundError:
+ except OSError:
# pkg-config is not installed
pass
else:
- core = output.decode().rstrip()
+ core = output.decode('utf-8').rstrip()
if os.path.isdir(core):
return core
diff --git a/build/qt5.py b/build/qt5.py
index 15b7731554..092c2bca3c 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().decode()
+ QT5LIBDIR = subprocess.Popen(["pkg-config", "--variable=libdir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip().decode('utf-8')
if not os.path.isdir(QT5INCDIR):
- QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip().decode()
+ QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip().decode('utf-8')
finally:
pass
return QT5LIBDIR, QT5INCDIR, os.path.join(QT5INCDIR,module)