[Numpy-svn] r4444 - in branches/numpy.scons/numpy/distutils/scons: . checkers

numpy-svn@scip... numpy-svn@scip...
Mon Nov 12 05:06:28 CST 2007


Author: cdavid
Date: 2007-11-12 05:06:23 -0600 (Mon, 12 Nov 2007)
New Revision: 4444

Modified:
   branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
   branches/numpy.scons/numpy/distutils/scons/fortran.py
   branches/numpy.scons/numpy/distutils/scons/fortran_scons.py
Log:
Make F77_LDFLAGS a list instead of a string

Modified: branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-11-12 10:48:54 UTC (rev 4443)
+++ branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-11-12 11:06:23 UTC (rev 4444)
@@ -122,6 +122,8 @@
         cfg = ConfigOpts(cpppath = cpppath, libs = libs, libpath = libpath,
                          rpath = deepcopy(libpath))
 
+	# XXX: How to know whether we need fortran or not
+	# ?
         if not env.has_key('F77_NAME_MANGLER'):
             if not CheckF77Mangling(context):
                 return 0
@@ -135,7 +137,7 @@
 
         # fortrancfg is used to merge info from fortran checks and site.cfg
         fortrancfg = deepcopy(cfg)
-        fortrancfg['linkflags'].append(env['F77_LDFLAGS'])
+        fortrancfg['linkflags'].extend(env['F77_LDFLAGS'])
 
         st = check_include_and_run(context, 'LAPACK (from site.cfg) ', fortrancfg,
                                   [], test_src, autoadd)

Modified: branches/numpy.scons/numpy/distutils/scons/fortran.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/fortran.py	2007-11-12 10:48:54 UTC (rev 4443)
+++ branches/numpy.scons/numpy/distutils/scons/fortran.py	2007-11-12 11:06:23 UTC (rev 4444)
@@ -36,9 +36,9 @@
     newflags = []
     for flag in linkflags:
         if flag.startswith('-L'):
-            newflags.append('/LIBPATH:%s' % i[2:])
+            newflags.append(r'/LIBPATH:%s' % flag[2:])
         elif flag.startswith('-l'):
-            newflags.append('lib%s.a' % i[2:])
+            newflags.append(r'lib%s.a' % flag[2:])
     return newflags
 
 def _check_link_verbose_posix(lines):

Modified: branches/numpy.scons/numpy/distutils/scons/fortran_scons.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/fortran_scons.py	2007-11-12 10:48:54 UTC (rev 4443)
+++ branches/numpy.scons/numpy/distutils/scons/fortran_scons.py	2007-11-12 11:06:23 UTC (rev 4444)
@@ -101,8 +101,10 @@
         final_flags = parse_f77link(cnt)
         if built_with_mstools(env) and built_with_gnu_f77(env):
             final_flags = gnu_to_ms_link(final_flags)
-        env.Append(F77_LDFLAGS = ' '.join(final_flags))
-        context.Result(env['F77_LDFLAGS'])
+	    print final_flags
+        #env.Append(F77_LDFLAGS = ' '.join(final_flags))
+        env['F77_LDFLAGS'] = final_flags
+        context.Result(str(env['F77_LDFLAGS']))
     else:
         context.Result('Failed !')
 



More information about the Numpy-svn mailing list