[Numpy-svn] r4270 - in branches/numpy.scons/numpy: distutils/scons random

numpy-svn@scip... numpy-svn@scip...
Sun Oct 21 08:50:35 CDT 2007


Author: cdavid
Date: 2007-10-21 08:50:30 -0500 (Sun, 21 Oct 2007)
New Revision: 4270

Modified:
   branches/numpy.scons/numpy/distutils/scons/TODO
   branches/numpy.scons/numpy/random/SConstruct
Log:
Get mathlib dynamically for random module

Modified: branches/numpy.scons/numpy/distutils/scons/TODO
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/TODO	2007-10-21 13:40:09 UTC (rev 4269)
+++ branches/numpy.scons/numpy/distutils/scons/TODO	2007-10-21 13:50:30 UTC (rev 4270)
@@ -1,5 +1,6 @@
 Checker:
     - improve CheckTypeSize for upstream integration
+    - improve BrokenMathlib and Mathlib in core, and make them available to everyone
     - improve Fortran runtime detection for upstream integration
     - improve Fortran mangling and dummy main detection for upstream
       integration

Modified: branches/numpy.scons/numpy/random/SConstruct
===================================================================
--- branches/numpy.scons/numpy/random/SConstruct	2007-10-21 13:40:09 UTC (rev 4269)
+++ branches/numpy.scons/numpy/random/SConstruct	2007-10-21 13:50:30 UTC (rev 4270)
@@ -2,7 +2,7 @@
 # vim:syntax=python
 import os
 
-from numpy.distutils.misc_util import get_numpy_include_dirs
+from numpy.distutils.misc_util import get_numpy_include_dirs, get_mathlibs
 from numpy.distutils.scons import GetNumpyEnvironment, scons_get_paths
 
 def CheckWincrypt(context):
@@ -30,6 +30,15 @@
 env = GetNumpyEnvironment(ARGUMENTS)
 env.Append(CPPPATH = scons_get_paths(env['include_bootstrap']))
 
+# XXX: this is ugly, better find the mathlibs with a checker 
+for i in scons_get_paths(env['include_bootstrap']):
+    try:
+        mlib =  get_mathlibs(i)
+        break
+    except IOError:
+        pass
+env.AppendUnique(LIBS = mlib)
+
 # On windows, see if we should use Advapi32
 if os.name == 'nt':
     config = env.NumpyConfigure(custom_tests = {'CheckWincrypt' : CheckWincrypt})



More information about the Numpy-svn mailing list