[gobject-introspection] ccompiler.py: MSVC builds: Fix running on Python 3.x



commit 77ce0c87f983e6e58ee422128bf9438da01e5a99
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Mar 17 17:51:32 2016 +0800

    ccompiler.py: MSVC builds: Fix running on Python 3.x
    
    When resolving libraries, open the temp file generated by dumpbin
    with 'r' mode rather than 'rb', since this is a text file.

 giscanner/ccompiler.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 2582338..57df9d6 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -328,7 +328,7 @@ class CCompiler(object):
                             output_flag = ['-out:' + tmp_filename]
                             proc = subprocess.call(args + [implib] + output_flag,
                                                    stdout=subprocess.PIPE)
-                            with open(tmp_filename, 'rb') as tmp_fileobj:
+                            with open(tmp_filename, 'r') as tmp_fileobj:
                                 for line in tmp_fileobj.read().splitlines():
 
                                     if '__IMPORT_DESCRIPTOR_' in line:


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