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

numpy-svn@scip... numpy-svn@scip...
Sat Oct 20 11:46:04 CDT 2007


Author: cdavid
Date: 2007-10-20 11:45:59 -0500 (Sat, 20 Oct 2007)
New Revision: 4265

Modified:
   branches/numpy.scons/numpy/core/SConstruct
   branches/numpy.scons/numpy/core/scons_support.py
Log:
Set mathlib to a string instead of stringed list on config.h

Modified: branches/numpy.scons/numpy/core/SConstruct
===================================================================
--- branches/numpy.scons/numpy/core/SConstruct	2007-10-20 16:44:51 UTC (rev 4264)
+++ branches/numpy.scons/numpy/core/SConstruct	2007-10-20 16:45:59 UTC (rev 4265)
@@ -76,7 +76,7 @@
 
 # TODO: getting the math lib automatically ? Having a list ?
 # TODO: checklib vs checkfunc ?
-mlibs = [[], ['cpml']]
+mlibs = [[], ['m'], ['cpml']]
 mathlib = os.environ.get('MATHLIB')
 if mathlib: 
     # XXX: prepend it
@@ -91,7 +91,7 @@
     raise SCons.Errors.UserError("No usable mathlib was found: chose another "\
                                  "one using the MATHLIB env variable, eg "\
                                  "MATHLIB=m")
-config_sym.append(('MATHLIB', str(mlib)))
+config_sym.append(('MATHLIB', mlib))
 
 def check_lib(f, autoadd = 0):
     """Check that f is available in mlib, and add the symbol appropriately.

Modified: branches/numpy.scons/numpy/core/scons_support.py
===================================================================
--- branches/numpy.scons/numpy/core/scons_support.py	2007-10-20 16:44:51 UTC (rev 4264)
+++ branches/numpy.scons/numpy/core/scons_support.py	2007-10-20 16:45:59 UTC (rev 4265)
@@ -10,7 +10,7 @@
      do_generate_api as nowrap_do_generate_ufunc_api
 
 from numpy.distutils.conv_template import process_str
-from numpy.distutils.scons.utils import _rsplit as rsplit
+from numpy.distutils.scons.utils import _rsplit as rsplit, isstring
 
 import SCons.Node
 
@@ -101,8 +101,10 @@
             return "#define %s\n\n" % define
         elif value == 0:
             return "/* #undef %s */\n\n" % define
+        elif isstring(value):
+            return "#define %s %s\n\n" % (define, value)
         else:
-            return "#define %s %s\n\n" % (define, value)
+            return "#define %s %s\n\n" % (define, ' '.join(value))
     t.writelines([write_symbol(i[0], i[1]) for i in sym])
     t.write('\n')
     t.close()



More information about the Numpy-svn mailing list