diff options
author | Uwe Klotz <uwe_klotz@web.de> | 2017-12-03 19:24:37 +0100 |
---|---|---|
committer | Uwe Klotz <uwe_klotz@web.de> | 2017-12-03 19:28:41 +0100 |
commit | 3aa000da3dff48692c58148aa1f26dabf27ed45e (patch) | |
tree | 4c87d7d3f53ba99643026ad5bf5bc8ae0175be27 | |
parent | d9af6cd265e5d5c60c93515b4442af8e99b52164 (diff) |
Revert "Decode subprocess output from bytes to str"
This reverts commit 3d49037c844e4a37493729388a07d3cc95c24e3d.
When piping ouput from scons during a build sys.stdout.encoding that is
used for decoding output from a subprocess seems to be undefined and
decoding fails:
https://stackoverflow.com/questions/492483/setting-the-correct-encoding-when-piping-stdout-in-python
-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 9b203a3618..965e9ed916 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].decode(sys.stdout.encoding).rstrip() + core = subprocess.Popen(["pkg-config", "--variable=libdir", "Qt5Core"], stdout = subprocess.PIPE).communicate()[0].rstrip() else: - core = subprocess.Popen(["pkg-config", "--variable=libdir", "QtCore"], stdout = subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding).rstrip() + core = subprocess.Popen(["pkg-config", "--variable=libdir", "QtCore"], stdout = subprocess.PIPE).communicate()[0].rstrip() finally: if os.path.isdir(core): return core diff --git a/build/qt5.py b/build/qt5.py index 25a3f9d6f2..50fcbd433a 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].decode(sys.stdout.encoding).rstrip() + QT5LIBDIR = subprocess.Popen(["pkg-config", "--variable=libdir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip() if not os.path.isdir(QT5INCDIR): - QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding).rstrip() + QT5INCDIR = subprocess.Popen(["pkg-config", "--variable=includedir", module5], stdout = subprocess.PIPE).communicate()[0].rstrip() finally: pass return QT5LIBDIR, QT5INCDIR, os.path.join(QT5INCDIR,module) |