summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2007-06-03 04:26:22 +0000
committercookedm <cookedm@localhost>2007-06-03 04:26:22 +0000
commitbbfdf129791e044e663c41e75bccc3b860b82c45 (patch)
treeb8827ef066ab14a9ec0485f8e45b5445601c3cd3
parent6f509f626355208b3cb97e692daf52c3734769cd (diff)
downloadnumpy-bbfdf129791e044e663c41e75bccc3b860b82c45.tar.gz
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.
-rw-r--r--numpy/distutils/fcompiler/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/distutils/fcompiler/__init__.py b/numpy/distutils/fcompiler/__init__.py
index 091dacd66..bff98010e 100644
--- a/numpy/distutils/fcompiler/__init__.py
+++ b/numpy/distutils/fcompiler/__init__.py
@@ -177,6 +177,8 @@ class FCompiler(CCompiler):
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 @@ class FCompiler(CCompiler):
## 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 @@ class FCompiler(CCompiler):
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]