[Numpy-svn] r4418 - in branches/numpy.scons/numpy/distutils/scons: . core

numpy-svn@scip... numpy-svn@scip...
Thu Nov 8 03:18:02 CST 2007


Author: cdavid
Date: 2007-11-08 03:17:50 -0600 (Thu, 08 Nov 2007)
New Revision: 4418

Modified:
   branches/numpy.scons/numpy/distutils/scons/Changelog
   branches/numpy.scons/numpy/distutils/scons/core/default.py
   branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
Log:
Add compiler configuration for mingw, update Changelog

Modified: branches/numpy.scons/numpy/distutils/scons/Changelog
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/Changelog	2007-11-08 08:56:34 UTC (rev 4417)
+++ branches/numpy.scons/numpy/distutils/scons/Changelog	2007-11-08 09:17:50 UTC (rev 4418)
@@ -1,4 +1,17 @@
+Thu, 08 Nov 2007 17:55:17 +0900
+
+User-visible Changes:
+	* numpy.scons can now built numpy on windows with mingw
+
+Wed, 07 Nov 2007 20:45:00 +0900 (3rd alpha)
+
+User-visible Changes:
+	* Sunperf hack to get linker options, because -xlic_lib does not seem
+	to work for shared libraries. I hope it works now.
+
+
 Tue, 06 Nov 2007 16:48:51 +0900
+
 User-visible Changes:
 	* CBLAS and LAPACK checkers now both handles MKL, ATLAS,
 	Accelerate/vecLib frameworks (Mac OS X only) and Sunperf (Solaris
@@ -18,6 +31,7 @@
 	* Basic design explained in doc/DESIGN
 
 Mon, 05 Nov 2007 19:44:07 +0900 (2nd alpha)
+
 User-visible Changes:
 	* numpy/distutils/scons/checkers 
 	Perflib checkers (MKL, ATLAS, etc...) can be disabled by using

Modified: branches/numpy.scons/numpy/distutils/scons/core/default.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/core/default.py	2007-11-08 08:56:34 UTC (rev 4417)
+++ branches/numpy.scons/numpy/distutils/scons/core/default.py	2007-11-08 09:17:50 UTC (rev 4418)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# Last Change: Mon Nov 05 06:00 PM 2007 J
+# Last Change: Thu Nov 08 06:00 PM 2007 J
 import sys
 import distutils.sysconfig
 
@@ -89,6 +89,9 @@
 # Basically, limit yourself to optimization/debug/warning flags.
 
 # XXX: customization from site.cfg or other ?
+# XXX: cache this between different scons calls (would need to move outside
+# scons invocation, and in distutils scons command....)
+
 class CompilerConfig:
     def __init__(self, optim = None, warn = None, debug = None, debug_symbol =
                  None, thread = None, extra = None):
@@ -120,6 +123,7 @@
 # It seems that scons consider any option with space in it as a multi option,
 # which breaks command line options. So just don't put space.
 def get_cc_config(name):
+    # name is the scons name for the tool
     if name == 'gcc':
         if distutils.sysconfig.get_config_vars('LDFLAGS')[0].find('-pthread'):
             thread = ['-pthread']
@@ -165,6 +169,9 @@
                              warn = ['/W3', '/Wall'],
                              thread = ['/MD', '/GX'], 
                              extra = ['/nologo'])
+    elif name == 'mingw':
+        cfg = CompilerConfig(optim = ['-O2', '-fno-strict-aliasing'],
+                             warn = ['-Wall', '-Wstrict-prototypes'])
     else:
         # For not yet supported compiler, just put everything in optims from
         # distutils

Modified: branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-08 08:56:34 UTC (rev 4417)
+++ branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-08 09:17:50 UTC (rev 4418)
@@ -207,10 +207,13 @@
             Tool(t)(env)
     else:
         try:
-	    t = FindTool(['g++'], env)
-	    env['LINK'] = t
-	except EnvironmentError:
-	    raise RuntimeError('g++ not found: this is necessary with mingw32 to build numpy !') 
+            t = FindTool(['g++'], env)
+            env['LINK'] = t
+        except EnvironmentError:
+            raise RuntimeError('g++ not found: this is necessary with mingw32 '\
+                               'to build numpy !') 
+        # XXX: is this really the right place ?
+        env.AppendUnique(CFLAGS = '-mno-cygwin')
 			
     for t in FindAllTools(DEF_OTHER_TOOLS, env):
         Tool(t)(env)



More information about the Numpy-svn mailing list