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

numpy-svn@scip... numpy-svn@scip...
Tue Jan 8 07:46:51 CST 2008


Author: cdavid
Date: 2008-01-08 07:46:46 -0600 (Tue, 08 Jan 2008)
New Revision: 4710

Modified:
   branches/build_with_scons/numpy/core/SConstruct
   branches/build_with_scons/numpy/core/scons_support.py
Log:
Now we use automatically generated config header instead of old kludge taken
from setup.py.



Modified: branches/build_with_scons/numpy/core/SConstruct
===================================================================
--- branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:31:21 UTC (rev 4709)
+++ branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:46:46 UTC (rev 4710)
@@ -12,7 +12,7 @@
 
 from scons_support import CheckBrokenMathlib, define_no_smp, \
     generate_config_header, generate_config_header_emitter, \
-    check_mlib, check_mlibs
+    check_mlib, check_mlibs, is_npy_no_signal
 
 env = GetNumpyEnvironment(ARGUMENTS)
 env.Append(CPPPATH = [get_python_inc()])
@@ -27,7 +27,7 @@
 #=======================
 # XXX: separate env for configuration
 config = env.NumpyConfigure(custom_tests = {'CheckBrokenMathlib' : CheckBrokenMathlib,
-    'CheckCBLAS' : CheckCBLAS}, config_h = 'scons_config.h')
+    'CheckCBLAS' : CheckCBLAS}, config_h = pjoin(env['build_dir'], 'config.h'))
 
 # Convention: list of tuples (definition, value). value:
 # - 0: #undef definition
@@ -64,7 +64,9 @@
 #----------------------
 # Checking signal stuff
 #----------------------
-# TODO
+if is_npy_no_signal():
+    config_sym.append(('NPY_NOSMP', '1'))
+    config.Define('NPY_NOSMP', 1, "define to 1 to disable SMP support ")
 
 #------------------------------------------
 # Checking the mathlib and its capabilities
@@ -157,9 +159,9 @@
     if a == 'AMD64':
         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 ")
+    moredefs.append('DISTUTILS_USE_SDK')
+    config.Define('DISTUTILS_USE_SDK', distutils_use_sdk, 
+                  "define to 1 to disable SMP support ")
 
 #--------------
 # Checking Blas
@@ -228,7 +230,7 @@
 # option ?)
 from os.path import join as pjoin
 
-config_header = env.GenerateConfigHeader(pjoin(env['build_dir'], 'config.h'), [])
+#config_header = env.GenerateConfigHeader(pjoin(env['build_dir'], 'config.h'), [])
 
 scalartypes_src = env.GenerateFromTemplate(
                     pjoin(env['build_dir'], 'src', 'scalartypes'), 

Modified: branches/build_with_scons/numpy/core/scons_support.py
===================================================================
--- branches/build_with_scons/numpy/core/scons_support.py	2008-01-08 13:31:21 UTC (rev 4709)
+++ branches/build_with_scons/numpy/core/scons_support.py	2008-01-08 13:46:46 UTC (rev 4710)
@@ -1,4 +1,4 @@
-#! Last Change: Tue Jan 08 08:00 PM 2008 J
+#! Last Change: Tue Jan 08 10:00 PM 2008 J
 
 __docstring__ = """Code to support special facilities to scons which are only
 useful for numpy.core, hence not put into numpy.distutils.scons"""
@@ -186,6 +186,12 @@
                                  "one using the MATHLIB env variable, eg "\
                                  "'MATHLIB=m python setup.py build'")
 
+
+def is_npy_no_signal():
+    """Return True if the NPY_NO_SIGNAL symbol must be defined in configuration
+    header."""
+    return sys.platform == 'win32'
+
 def define_no_smp():
     """Returns True if we should define NPY_NOSMP, False otherwise."""
     #--------------------------------



More information about the Numpy-svn mailing list