mailr23675 - /trunk/sconstruct


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

Header


Content

Posted by edward on June 06, 2014 - 09:30:
Author: bugman
Date: Fri Jun  6 09:30:52 2014
New Revision: 23675

URL: http://svn.gna.org/viewcvs/relax?rev=23675&view=rev
Log:
Bug fix for r23674, the compilation of the C modules now respects the user 
defined environment.

This is the patch from Justin (https://gna.org/users/jlec) attached to bug 
#22145
(https://gna.org/bugs/?22145).

The problem was that on Mac OS X (as well as other systems), that these 
environmental variables were
not defined and hence the scons commands would all fail with a KeyError and 
traceback.  Now the keys
in the os.environ dictionary are being searched for before they are set.


Modified:
    trunk/sconstruct

Modified: trunk/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/trunk/sconstruct?rev=23675&r1=23674&r2=23675&view=diff
==============================================================================
--- trunk/sconstruct    (original)
+++ trunk/sconstruct    Fri Jun  6 09:30:52 2014
@@ -631,9 +631,13 @@
             nodes.append(env.SharedObject(dir + path.sep + file, 
CCFLAGS=cflags))
 
         # Respect the user environment, specifically compiler, compiler- and 
linkerflags.
-        env.Append(LINKFLAGS = environ['LDFLAGS'])
-        env.Append(CFLAGS = environ['CFLAGS'])
-        env.Replace(CC = environ['CC'])
+        print environ
+        if 'LDFLAGS' in environ:
+            env.Append(LINKFLAGS = environ['LDFLAGS'])
+        if 'CFLAGS' in environ:
+            env.Append(CFLAGS = environ['CFLAGS'])
+        if 'CC' in environ:
+            env.Replace(CC = environ['CC'])
 
         # Build the relaxation curve fitting module.
         self.relax_fit_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix)




Related Messages


Powered by MHonArc, Updated Fri Jun 06 09:40:02 2014