[Numpy-svn] r3856 - trunk/numpy/distutils/fcompiler

numpy-svn@scip... numpy-svn@scip...
Fri Jun 1 08:57:29 CDT 2007


Author: pearu
Date: 2007-06-01 08:57:24 -0500 (Fri, 01 Jun 2007)
New Revision: 3856

Modified:
   trunk/numpy/distutils/fcompiler/__init__.py
Log:
Reduced find_executables messages.

Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py	2007-06-01 13:36:59 UTC (rev 3855)
+++ trunk/numpy/distutils/fcompiler/__init__.py	2007-06-01 13:57:24 UTC (rev 3856)
@@ -207,7 +207,7 @@
     ## They are private to FCompiler class and may return unexpected
     ## results if used elsewhere. So, you have been warned..
 
-    def find_executables(self):
+    def find_executables(self,exe_cache = {}):
         """Go through the self.executables dictionary, and attempt to
         find and assign appropiate executables.
 
@@ -219,12 +219,13 @@
         or the Fortran 90 compiler executable is used, unless overridden
         by an environment setting.
         """
-        exe_cache = {}
+        if exe_cache: # been here
+            return
         def cached_find_executable(exe):
             if exe in exe_cache:
                 return exe_cache[exe]
             fc_exe = find_executable(exe)
-            exe_cache[exe] = fc_exe
+            exe_cache[exe] = exe_cache[fc_exe] = fc_exe
             return fc_exe
         def set_exe(exe_key, f77=None, f90=None):
             cmd = self.executables.get(exe_key, None)



More information about the Numpy-svn mailing list