mailr28261 - /trunk/sconstruct


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

Header


Content

Posted by edward on October 27, 2016 - 12:35:
Author: bugman
Date: Thu Oct 27 12:35:53 2016
New Revision: 28261

URL: http://svn.gna.org/viewcvs/relax?rev=28261&view=rev
Log:
Windows scons C module compilation now defaults to 32-bit.

This is because the default Python downloads are 32-bit.  And many libraries 
(e.g. numpy and scipy)
are only pre-compiled as 32-bit.  Hence a 64-bit relax build on Windows will 
require a lot of custom
compilation that most users will never do.


Modified:
    trunk/sconstruct

Modified: trunk/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/trunk/sconstruct?rev=28261&r1=28260&r2=28261&view=diff
==============================================================================
--- trunk/sconstruct    (original)
+++ trunk/sconstruct    Thu Oct 27 12:35:53 2016
@@ -59,6 +59,10 @@
 # Symbolic link flag.
 SYMLINK_FLAG = 1
 
+# Force a different target archictecture for MS Windows, if set (as the 
default Python download is 32-bit).
+WIN_TARGET_OVERRIDE = True
+TARGET_ARCH = None
+
 # GNU/Linux.
 if SYSTEM == 'Linux':
     # System specific string.
@@ -73,20 +77,27 @@
     # Set the system to 'Windows' no matter what.
     SYSTEM = 'Windows'
 
-    # Architecture.
-    arch = platform.architecture()[0]
-
-    # 32 bit.
-    if arch == '32bit':
+    # Force a default of 32-bit.
+    if WIN_TARGET_OVERRIDE:
+        TARGET_ARCH = 'x86'
         SYS = 'Win32'
 
-    # 64 bit.
-    elif arch == '64bit':
-        SYS = 'Win64'
-
-    # Unknown.
+    # Determine the architecture.
     else:
-        SYS = 'Win'
+        # Architecture.
+        arch = platform.architecture()[0]
+
+        # 32 bit.
+        if arch == '32bit':
+            SYS = 'Win32'
+
+        # 64 bit.
+        elif arch == '64bit':
+            SYS = 'Win64'
+
+        # Unknown.
+        else:
+            SYS = 'Win'
 
     # Windows installation path.
     INSTALL_PATH = 'C:\\'
@@ -601,7 +612,7 @@
         py_bin_fullpath = py_bin_minpath + path.sep + 'python' + 
`sys.version_info[0]` + '.' + `sys.version_info[1]`
 
         # Relaxation curve fitting build environment.
-        env = Environment()
+        env = Environment(TARGET_ARCH=TARGET_ARCH)
 
         # Determine the cross-compilation architectures for Mac systems.
         if env['PLATFORM'] == 'darwin':




Related Messages


Powered by MHonArc, Updated Thu Oct 27 13:00:06 2016