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

numpy-svn@scip... numpy-svn@scip...
Sat Jun 2 23:26:26 CDT 2007


Author: cookedm
Date: 2007-06-02 23:26:22 -0500 (Sat, 02 Jun 2007)
New Revision: 3858

Modified:
   trunk/numpy/distutils/fcompiler/__init__.py
Log:
Fix #534, introduced by r3856. The return when exe_cache had something in it
meant that FCompiler.find_executables would be executed *once*, regardless
of how many subclasses called it.


Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py	2007-06-01 19:29:37 UTC (rev 3857)
+++ trunk/numpy/distutils/fcompiler/__init__.py	2007-06-03 04:26:22 UTC (rev 3858)
@@ -177,6 +177,8 @@
     shared_lib_format = "%s%s"
     exe_extension = ""
 
+    _exe_cache = {}
+
     def __init__(self, *args, **kw):
         CCompiler.__init__(self, *args, **kw)
         self.distutils_vars = self.distutils_vars.clone(self._environment_hook)
@@ -207,7 +209,7 @@
     ## They are private to FCompiler class and may return unexpected
     ## results if used elsewhere. So, you have been warned..
 
-    def find_executables(self,exe_cache = {}):
+    def find_executables(self):
         """Go through the self.executables dictionary, and attempt to
         find and assign appropiate executables.
 
@@ -219,8 +221,7 @@
         or the Fortran 90 compiler executable is used, unless overridden
         by an environment setting.
         """
-        if exe_cache: # been here
-            return
+        exe_cache = self._exe_cache
         def cached_find_executable(exe):
             if exe in exe_cache:
                 return exe_cache[exe]



More information about the Numpy-svn mailing list