[Numpy-svn] r4223 - branches/numpy.scons/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Oct 18 01:42:30 EDT 2007


Author: cdavid
Date: 2007-10-18 00:42:25 -0500 (Thu, 18 Oct 2007)
New Revision: 4223

Modified:
   branches/numpy.scons/numpy/core/SConstruct
Log:
Look for strtod if necessary in core config

Modified: branches/numpy.scons/numpy/core/SConstruct
===================================================================
--- branches/numpy.scons/numpy/core/SConstruct	2007-10-18 05:15:15 UTC (rev 4222)
+++ branches/numpy.scons/numpy/core/SConstruct	2007-10-18 05:42:25 UTC (rev 4223)
@@ -1,4 +1,4 @@
-# Last Change: Tue Oct 16 02:00 PM 2007 J
+# Last Change: Thu Oct 18 02:00 PM 2007 J
 # vim:syntax=python
 import os
 from os.path import join as pjoin, basename as pbasename, dirname as pdirname
@@ -24,15 +24,6 @@
         elif SCons.Util.is_String(value):
             return "#define %s %s\n\n" % (define, value)
     t.writelines([write_symbol(i[0], i[1]) for i in sym])
-    # XXX: do something about this: a config.h really should not have #ifdef,
-    # only #define. 
-    t.writelines("""
-#ifdef WITH_THREAD
-#define NPY_ALLOW_THREADS 1
-#else
-#define NPY_ALLOW_THREADS 0
-#endif
-""")
     t.write('\n')
     t.close()
 
@@ -69,10 +60,10 @@
         nosmp = 1
     except KeyError:
         nosmp = 0
-#if nosmp:
-#    config_sym.append(('NPY_ALLOW_THREADS', '0'))
-#else:
-#    config_sym.append(('NPY_ALLOW_THREADS', '1'))
+if nosmp:
+    config_sym.append(('NPY_NOSMP', '0'))
+else:
+    config_sym.append(('NPY_NOSMP', '1'))
 
 def CheckBrokenMathlib(context, mathlib):
     src = """
@@ -178,6 +169,14 @@
 # XXX: What are we supposed to do if the math lib is broken ?
 config.CheckBrokenMathlib(mlib)
 
+#-------------------------------------------------------
+# Define the function PyOS_ascii_strod if not available
+#-------------------------------------------------------
+# XXX: would be better to check for PyOS_ascii_strod instead of version
+if sys.version[:3] < '2.4':
+    if config.CheckFunc('strtod'):
+        config_sym.append('PyOS_ascii_strtod', 'strtod')
+
 #--------------
 # Checking Blas
 #--------------




More information about the Numpy-svn mailing list