From 9b59edebeadddf8012459e401434353b2de8babb Mon Sep 17 00:00:00 2001 From: Ryan Grout Date: Tue, 13 Oct 2015 16:52:56 -0500 Subject: [PATCH] BUG: fix AttributeError in numpy/distutils. Corrects an AttributeError on windows in some cases caused by #6185 --- numpy/distutils/ccompiler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index b5970d76fe08..ad235ed1997b 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -385,10 +385,11 @@ def CCompiler_customize(self, dist, need_cxx=0): a, b = 'cc', 'c++' self.compiler_cxx = [self.compiler[0].replace(a, b)]\ + self.compiler[1:] - elif not self.compiler_cxx: + else: if hasattr(self, 'compiler'): log.warn("#### %s #######" % (self.compiler,)) - log.warn('Missing compiler_cxx fix for '+self.__class__.__name__) + if not hasattr(self, 'compiler_cxx'): + log.warn('Missing compiler_cxx fix for ' + self.__class__.__name__) return replace_method(CCompiler, 'customize', CCompiler_customize)