mailr17911 - in /trunk: dep_check.py info.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 17, 2012 - 22:43:
Author: bugman
Date: Wed Oct 17 22:43:22 2012
New Revision: 17911

URL: http://svn.gna.org/viewcvs/relax?rev=17911&view=rev
Log:
Scons fix for MS Windows.

A bug was introduced back at r17786 which causes scons to fail on MS Windows. 
 This has to do with
the ctypes.Structure object but strangely led to a AttributeError importing 
scipy when initialising
scons.


Modified:
    trunk/dep_check.py
    trunk/info.py

Modified: trunk/dep_check.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/dep_check.py?rev=17911&r1=17910&r2=17911&view=diff
==============================================================================
--- trunk/dep_check.py (original)
+++ trunk/dep_check.py Wed Oct 17 22:43:22 2012
@@ -217,12 +217,19 @@
 # ctypes module.
 try:
     import ctypes
-    from ctypes import Structure
     ctypes_module = True
 except ImportError:
     message = sys.exc_info()[1]
     ctypes_module = False
     ctypes_module_message = message.args[0]
+try:
+    from ctypes import Structure
+    ctypes_structure_module = True
+except ImportError:
+    message = sys.exc_info()[1]
+    ctypes_structure_module = False
+    ctypes_structure_module_message = message.args[0]
+
 
 
 

Modified: trunk/info.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/info.py?rev=17911&r1=17910&r2=17911&view=diff
==============================================================================
--- trunk/info.py (original)
+++ trunk/info.py Wed Oct 17 22:43:22 2012
@@ -28,11 +28,13 @@
 # Python module imports.
 if dep_check.ctypes_module:
     import ctypes
-    from ctypes import Structure
     if hasattr(ctypes, 'windll'):
         import ctypes.wintypes
 else:
     ctypes = None
+if dep_check.ctypes_structure_module:
+    from ctypes import Structure
+else:
     Structure = object
 import numpy
 from os import environ, waitpid




Related Messages


Powered by MHonArc, Updated Wed Oct 17 23:00:02 2012