[Numpy-svn] r4708 - branches/build_with_scons/numpy/core

numpy-svn@scip... numpy-svn@scip...
Tue Jan 8 07:10:55 CST 2008


Author: cdavid
Date: 2008-01-08 07:10:52 -0600 (Tue, 08 Jan 2008)
New Revision: 4708

Modified:
   branches/build_with_scons/numpy/core/SConstruct
Log:
More work on automatic generation of config.h (not ready yet)

Modified: branches/build_with_scons/numpy/core/SConstruct
===================================================================
--- branches/build_with_scons/numpy/core/SConstruct	2008-01-08 12:45:12 UTC (rev 4707)
+++ branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:10:52 UTC (rev 4708)
@@ -1,4 +1,4 @@
-# Last Change: Tue Jan 08 09:00 PM 2008 J
+# Last Change: Tue Jan 08 10:00 PM 2008 J
 # vim:syntax=python
 import os
 import sys
@@ -93,7 +93,7 @@
 # XXX: this is ugly: mathlib has nothing to do in a public header file
 config_sym.append(('MATHLIB', ','.join(mlib)))
 
-def check_lib(f, autoadd = 0):
+def check_func(f):
     """Check that f is available in mlib, and add the symbol appropriately.
 
     f is expected to be a tuble (symbol, cpp define)."""
@@ -103,9 +103,8 @@
     else:
         config_sym.append((f[1], 0))
 
-check_lib(mfuncs[0], autoadd = 1)
-for f in mfuncs[1:]:
-    check_lib(f)
+for f in mfuncs:
+    check_func(f)
 
 #-------------------------------------------------------
 # Define the function PyOS_ascii_strod if not available
@@ -124,16 +123,23 @@
 
 if define_no_smp():
     config_sym.append(('NPY_NOSMP', '1'))
+    config.Define('NPY_NOSMP', 1, "define to 1 to disable SMP support ")
 else:
     config_sym.append(('NPY_NOSMP', '0'))
+    config.Define('NPY_NOSMP', 0, "define to 1 to disable SMP support ")
 
 # XXX: this is ugly
+distutils_use_sdk = 0
 if sys.platform=='win32' or os.name=='nt':
     from distutils.msvccompiler import get_build_architecture
     a = get_build_architecture()
     print 'BUILD_ARCHITECTURE: %r, os.name=%r, sys.platform=%r' % (a, os.name, sys.platform)
     if a == 'AMD64':
-        moredefs.append(('DISTUTILS_USE_SDK', 1))
+        distutils_use_sdk = 1
+if distutils_use_sdk:
+    moredefs.append(('DISTUTILS_USE_SDK', 1))
+config.Define('DISTUTILS_USE_SDK', distutils_use_sdk, 
+              "define to 1 to disable SMP support ")
 
 #--------------
 # Checking Blas



More information about the Numpy-svn mailing list