[pygobject] setup.py: handle missing config.h



commit 42c63ade18b4e54ac9d75ee7b022d2b6839840fc
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Fri Mar 23 09:21:29 2018 +0100

    setup.py: handle missing config.h
    
    oops

 setup.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/setup.py b/setup.py
index 60f05fc1..3985e410 100755
--- a/setup.py
+++ b/setup.py
@@ -815,9 +815,12 @@ class build_ext(du_build_ext):
 #endif /* _CONFIG_H */
 """ % versions
 
-        with io.open(target, 'r', encoding="utf-8") as h:
-            if h.read() == content:
-                return
+        try:
+            with io.open(target, 'r', encoding="utf-8") as h:
+                if h.read() == content:
+                    return
+        except EnvironmentError:
+            pass
 
         with io.open(target, 'w', encoding="utf-8") as h:
             h.write(content)


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