diff options
| author | Ryan Grout <rgrout@continuum.io> | 2015-10-13 16:52:56 -0500 |
|---|---|---|
| committer | Ryan Grout <rgrout@continuum.io> | 2015-10-19 16:02:08 -0500 |
| commit | 9b59edebeadddf8012459e401434353b2de8babb (patch) | |
| tree | 54e411ff713ceae2d43ab9b461146866215f982f /numpy/distutils/ccompiler.py | |
| parent | 17146b2a873e835630ad58d00b73e97ba1fdb214 (diff) | |
| download | numpy-9b59edebeadddf8012459e401434353b2de8babb.tar.gz | |
BUG: fix AttributeError in numpy/distutils.
Corrects an AttributeError on windows in some cases caused by #6185
Diffstat (limited to 'numpy/distutils/ccompiler.py')
| -rw-r--r-- | numpy/distutils/ccompiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index b5970d76f..ad235ed19 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) |
