[pygobject/setup-py-msvc-fix] setup.py: skip adding gcc warnings flags with msvc. Fixes #275



commit f7503c4cd1c03fde215024e61db9e1a439f39997
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Nov 10 10:40:16 2018 +0100

    setup.py: skip adding gcc warnings flags with msvc. Fixes #275
    
    The compiler.compiler attribute isn't available with msvc and errors
    out. The warning flag detection code only works with gcc style compilers
    anyway so just skip it with msvc.

 setup.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/setup.py b/setup.py
index 902aab25..5001fa75 100755
--- a/setup.py
+++ b/setup.py
@@ -891,6 +891,9 @@ def add_ext_pkg_config_dep(ext, compiler_type, name):
 
 
 def add_ext_compiler_flags(ext, compiler, _cache={}):
+    if compiler.compiler_type == "msvc":
+        return
+
     cache_key = compiler.compiler[0]
     if cache_key not in _cache:
 


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