[Scipy-svn] r6504 - branches/0.8.x/scipy/sparse/linalg/dsolve

scipy-svn@scip... scipy-svn@scip...
Wed Jun 16 05:59:02 CDT 2010


Author: rgommers
Date: 2010-06-16 05:59:02 -0500 (Wed, 16 Jun 2010)
New Revision: 6504

Modified:
   branches/0.8.x/scipy/sparse/linalg/dsolve/SConscript
Log:
BUG: backport of r6487. Attempt at fixing #1176.

Modified: branches/0.8.x/scipy/sparse/linalg/dsolve/SConscript
===================================================================
--- branches/0.8.x/scipy/sparse/linalg/dsolve/SConscript	2010-06-16 03:53:04 UTC (rev 6503)
+++ branches/0.8.x/scipy/sparse/linalg/dsolve/SConscript	2010-06-16 10:59:02 UTC (rev 6504)
@@ -1,4 +1,5 @@
-from os.path import join as pjoin
+import os
+import glob
 import sys
 
 from numscons import GetNumpyEnvironment
@@ -29,46 +30,22 @@
 if sys.platform == 'win32':
     superlu_def.append((('NO_TIMER'), 1))
 superlu_def.append((('USE_VENDOR_BLAS'), 2))
-superlu_env.Append(CPPDEFINES = superlu_def)
+superlu_env.Append(CPPDEFINES=superlu_def)
+superlu_env.Append(CPPPATH=[os.path.join('SuperLU', 'SRC')])
 
-superlu_src = [pjoin('SuperLU', 'SRC', s) for s in [ "ccolumn_bmod.c",
-"ccolumn_dfs.c", "ccopy_to_ucol.c", "cgscon.c", "cgsequ.c", "cgsrfs.c",
-"cgssv.c", "cgssvx.c", "cgstrf.c", "cgstrs.c", "clacon.c", "clangs.c",
-"claqgs.c", "cmemory.c", "colamd.c", "cpanel_bmod.c", "cpanel_dfs.c",
-"cpivotL.c", "cpivotgrowth.c", "cpruneL.c", "creadhb.c", "csnode_bmod.c",
-"csnode_dfs.c", "csp_blas2.c", "csp_blas3.c", "cutil.c", "dGetDiagU.c",
-"dcolumn_bmod.c", "dcolumn_dfs.c", "dcomplex.c", "dcopy_to_ucol.c", "dgscon.c",
-"dgsequ.c", "dgsrfs.c", "dgssv.c", "dgssvx.c", "dgstrf.c", "dgstrs.c",
-"dgstrsL.c", "dlacon.c", "dlamch.c", "dlangs.c", "dlaqgs.c", "dmemory.c",
-"dpanel_bmod.c", "dpanel_dfs.c", "dpivotL.c", "dpivotgrowth.c", "dpruneL.c",
-"dreadhb.c", "dsnode_bmod.c", "dsnode_dfs.c", "dsp_blas2.c", "dsp_blas3.c",
-"dutil.c", "dzsum1.c", "get_perm_c.c", "heap_relax_snode.c", "icmax1.c",
-"izmax1.c", "memory.c", "mmd.c", "relax_snode.c", "scolumn_bmod.c",
-"scolumn_dfs.c", "scomplex.c", "scopy_to_ucol.c", "scsum1.c", "sgscon.c",
-"sgsequ.c", "sgsrfs.c", "sgssv.c", "sgssvx.c", "sgstrf.c", "sgstrs.c",
-"slacon.c", "slamch.c", "slangs.c", "slaqgs.c", "smemory.c", "sp_coletree.c",
-"sp_ienv.c", "sp_preorder.c", "spanel_bmod.c", "spanel_dfs.c", "spivotL.c",
-"spivotgrowth.c", "spruneL.c", "sreadhb.c", "ssnode_bmod.c", "ssnode_dfs.c",
-"ssp_blas2.c", "ssp_blas3.c", "superlu_timer.c", "sutil.c", "util.c",
-"xerbla.c", "zcolumn_bmod.c", "zcolumn_dfs.c", "zcopy_to_ucol.c", "zgscon.c",
-"zgsequ.c", "zgsrfs.c", "zgssv.c", "zgssvx.c", "zgstrf.c", "zgstrs.c",
-"zlacon.c", "zlangs.c", "zlaqgs.c", "zmemory.c", "zpanel_bmod.c",
-"zpanel_dfs.c", "zpivotL.c", "zpivotgrowth.c", "zpruneL.c", "zreadhb.c",
-"zsnode_bmod.c", "zsnode_dfs.c", "zsp_blas2.c", "zsp_blas3.c", "zutil.c"]]
+superlu_src = env.Glob(os.path.join('SuperLU', 'SRC', "*.c"))
 
 # XXX: we should detect whether lsame is already defined in BLAS/LAPACK. Here,
 # when using MSVC + MKL, lsame is already in MKL
 if not (built_with_mstools(env) and (not built_with_gnu_f77(env))):
-    superlu_src.append(pjoin("SuperLU", "SRC", "lsame.c"))
-superlu = superlu_env.DistutilsStaticExtLibrary('superlu_src', source = superlu_src)
+    superlu_src.append(os.path.join("SuperLU", "SRC", "lsame.c"))
+superlu = superlu_env.DistutilsStaticExtLibrary('superlu_src', source=superlu_src)
 
 # Build python extensions
 pyenv = env.Clone()
-pyenv.Append(CPPPATH = [pjoin('SuperLU', 'SRC')])
-pyenv.Prepend(LIBS = superlu)
+pyenv.Append(CPPPATH=[os.path.join('SuperLU', 'SRC')])
+pyenv.Prepend(LIBPATH=["."])
+pyenv.Prepend(LIBS=["superlu_src"])
 common_src = ['_superlu_utils.c', '_superluobject.c']
 
-for prec in ['z', 'd', 'c', 's']:
-    pyenv.NumpyPythonExtension('_%ssuperlu' % prec, 
-                               source = common_src + \
-                                        ['_%ssuperlumodule.c' % prec]) 
+pyenv.NumpyPythonExtension('_superlu', source=common_src + ['_superlumodule.c'])



More information about the Scipy-svn mailing list