mailr6320 - /1.3/sconstruct


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

Header


Content

Posted by edward on June 07, 2008 - 19:33:
Author: bugman
Date: Sat Jun  7 19:33:23 2008
New Revision: 6320

URL: http://svn.gna.org/viewcvs/relax?rev=6320&view=rev
Log:
Bug fix for compilation on Windows with Python 2.5.

The shared library extension should end with '.pyd' in Windows.  For Python 
versions 2.4 and below,
'.dll' extensions were happily loaded.  But with version 2.5, this extension 
is no longer
recognised!


Modified:
    1.3/sconstruct

Modified: 1.3/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sconstruct?rev=6320&r1=6319&r2=6320&view=diff
==============================================================================
--- 1.3/sconstruct (original)
+++ 1.3/sconstruct Sat Jun  7 19:33:23 2008
@@ -358,7 +358,7 @@
         print "###############\n\n"
 
         # Extensions of files to remove.
-        temp_extns = ['so', 'sconsign', 'dll']
+        temp_extns = ['so', 'sconsign', 'dll', 'pyd']
 
         # Print out.
         print "\nRemoving the files ending in " + `temp_extns` + ".\n"
@@ -495,7 +495,12 @@
         if env['PLATFORM'] == 'darwin':
             env.Append(LINKFLAGS = ['-bundle', '-bundle_loader', sys.prefix 
+ path.sep + 'bin' + path.sep + 'python', '-dynamic'])
             env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')
-            env['SHLIBSUFFIX'] = '.so'
+
+        # Shared library prefix and suffix.
+        prefix = ''
+        suffix = '.so'
+        if SYSTEM == 'Windows':
+            suffix = '.pyd'
 
         # Loop over the relaxation curve fitting files.
         nodes = []
@@ -503,7 +508,7 @@
             nodes.append(env.SharedObject(dir + path.sep + file, 
CCFLAGS=cflags))
 
         # Build the relaxation curve fitting module.
-        self.relax_fit_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX='')
+        self.relax_fit_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix)
 
         # Print out string returning function.
         def print_string(target, source, env):




Related Messages


Powered by MHonArc, Updated Sun Jun 08 00:40:23 2008