[gobject-introspection] giscanner/ccompiler.py: Make Windows builds work with Python 3.x



commit ee28491dec8b34e60e5e8278c769929adeed05ed
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Oct 28 16:13:07 2015 +0800

    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

 giscanner/ccompiler.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 515b422..9b27f0e 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]