summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-10-28 16:13:07 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-10-28 22:05:18 +0800
commitee28491dec8b34e60e5e8278c769929adeed05ed (patch)
tree6e77c8913a47285b578acf855a73b904a17a7df0
parentf12d853b98b638b1a65cd27eddf2fb06e6540249 (diff)
downloadgobject-introspection-ee28491dec8b34e60e5e8278c769929adeed05ed.tar.gz
giscanner/ccompiler.py: Make Windows builds work with Python 3.x
Windows builds check the library that was passed into the introspection scanner to deduce the correct DLL that is to be used by the .gir/.typelib file, but this was not updated for Python 2.x/3.x compatibility, as the outputs of a subprocess must be decoded. Fix this for both MSVC and MinGW-based builds. https://bugzilla.gnome.org/show_bug.cgi?id=757126
-rw-r--r--giscanner/ccompiler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 515b4227..9b27f0e1 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -285,7 +285,7 @@ class CCompiler(object):
proc = subprocess.Popen([self.compiler_cmd, '-print-search-dirs'],
stdout=subprocess.PIPE)
o, e = proc.communicate()
- for line in o.splitlines():
+ for line in o.decode('ascii').splitlines():
if line.startswith('libraries: '):
libsearch = line[len('libraries: '):].split(';')
@@ -313,7 +313,7 @@ class CCompiler(object):
proc = subprocess.Popen(args + [implib],
stdout=subprocess.PIPE)
o, e = proc.communicate()
- for line in o.splitlines():
+ for line in o.decode('ascii').splitlines():
if self.check_is_msvc():
# On Visual Studio, dumpbin -symbols something.lib gives the
# filename of DLL without the '.dll' extension that something.lib