[Numpy-svn] r4392 - in branches/numpy.scons/numpy/distutils: command scons scons/doc

numpy-svn@scip... numpy-svn@scip...
Mon Nov 5 09:01:09 CST 2007


Author: cdavid
Date: 2007-11-05 09:00:21 -0600 (Mon, 05 Nov 2007)
New Revision: 4392

Modified:
   branches/numpy.scons/numpy/distutils/command/scons.py
   branches/numpy.scons/numpy/distutils/scons/doc/TODO
   branches/numpy.scons/numpy/distutils/scons/numpyenv.py
Log:
Starts supporting env wo fcompiler for scons

Modified: branches/numpy.scons/numpy/distutils/command/scons.py
===================================================================
--- branches/numpy.scons/numpy/distutils/command/scons.py	2007-11-05 11:40:33 UTC (rev 4391)
+++ branches/numpy.scons/numpy/distutils/command/scons.py	2007-11-05 15:00:21 UTC (rev 4392)
@@ -173,7 +173,8 @@
                                        verbose = self.verbose,
                                        dry_run = self.dry_run,
                                        force = self.force)
-        self.fcompiler.customize(self.distribution)
+	if self.fcompiler is not None:
+	    self.fcompiler.customize(self.distribution)
 
     def run(self):
         # XXX: when a scons script is missing, scons only prints warnings, and
@@ -201,8 +202,9 @@
             cmd.append('cc_opt=%s' % dist2sconscc(self.compiler))
             cmd.append('cc_opt_path=%s' % protect_path(get_tool_path(self.compiler)))
 
-            cmd.append('f77_opt=%s' % dist2sconsfc(self.fcompiler))
-            cmd.append('f77_opt_path=%s' % protect_path(get_f77_tool_path(self.fcompiler)))
+	    if self.fcompiler:
+                cmd.append('f77_opt=%s' % dist2sconsfc(self.fcompiler))
+                cmd.append('f77_opt_path=%s' % protect_path(get_f77_tool_path(self.fcompiler)))
 
             cmd.append('include_bootstrap=%s' % dirl_to_str(get_numpy_include_dirs()))
             if self.silent:

Modified: branches/numpy.scons/numpy/distutils/scons/doc/TODO
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/doc/TODO	2007-11-05 11:40:33 UTC (rev 4391)
+++ branches/numpy.scons/numpy/distutils/scons/doc/TODO	2007-11-05 15:00:21 UTC (rev 4392)
@@ -4,6 +4,7 @@
       test_snippets in meta checkers, make meta-checkers overridable through
       site.cfg
     - f2py: supports the macro in doc/FORTRAN
+    - support environments wo fortran compilers
 
 Before first beta:
     - f2py and scipy interoperability: N hours

Modified: branches/numpy.scons/numpy/distutils/scons/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-11-05 11:40:33 UTC (rev 4391)
+++ branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-11-05 15:00:21 UTC (rev 4392)
@@ -167,13 +167,13 @@
             # scons could not understand cc_opt (bad name ?)
             raise AssertionError("SCONS: Could not initialize tool ? Error is %s" % \
                                  str(e))
+        # XXX: really have to understand how fortran compilers work in scons...
+        env['F77'] = env['_FORTRAND']
     else:
-        t = Tool(FindTool(DEF_FORTRAN_COMPILERS))
-        t(env)
+	raise NotImplementedError('FIXME: Support for env wo fcompiler not tested yet !')
+        #t = Tool(FindTool(DEF_FORTRAN_COMPILERS))
+        #t(env)
 
-    # XXX: really have to understand how fortran compilers work in scons...
-    env['F77'] = env['_FORTRAND']
-
     # XXX: Really, we should use our own subclass of Environment, instead of
     # adding Numpy* functions !
 



More information about the Numpy-svn mailing list