diff options
author | David Cournapeau <cournape@gmail.com> | 2008-12-27 10:32:05 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-12-27 10:32:05 +0000 |
commit | cdc45ed90d1eecc9a025448a0dce2644b75de66f (patch) | |
tree | 20e1256a84f0e2ab581f97b299033cf19ab14446 /numpy/distutils/command/config.py | |
parent | 7b811f816d7f95d4207117ff4a72e206b732270c (diff) | |
download | numpy-cdc45ed90d1eecc9a025448a0dce2644b75de66f.tar.gz |
Try to initialize the msvc compiler before the general code to detect the error early.
Diffstat (limited to 'numpy/distutils/command/config.py')
-rw-r--r-- | numpy/distutils/command/config.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py index aa9a67e87..1526dd411 100644 --- a/numpy/distutils/command/config.py +++ b/numpy/distutils/command/config.py @@ -41,15 +41,6 @@ class config(old_config): def _check_compiler (self): old_config._check_compiler(self) from numpy.distutils.fcompiler import FCompiler, new_fcompiler - if not isinstance(self.fcompiler, FCompiler): - self.fcompiler = new_fcompiler(compiler=self.fcompiler, - dry_run=self.dry_run, force=1, - c_compiler=self.compiler) - if self.fcompiler is not None: - self.fcompiler.customize(self.distribution) - if self.fcompiler.get_version(): - self.fcompiler.customize_cmd(self) - self.fcompiler.show_customization() if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc': # XXX: hack to circumvent a python 2.6 bug with msvc9compiler: @@ -74,6 +65,16 @@ class was %s ============================================================================""" raise distutils.errors.DistutilsPlatformError(msg) + if not isinstance(self.fcompiler, FCompiler): + self.fcompiler = new_fcompiler(compiler=self.fcompiler, + dry_run=self.dry_run, force=1, + c_compiler=self.compiler) + if self.fcompiler is not None: + self.fcompiler.customize(self.distribution) + if self.fcompiler.get_version(): + self.fcompiler.customize_cmd(self) + self.fcompiler.show_customization() + def _wrap_method(self,mth,lang,args): from distutils.ccompiler import CompileError from distutils.errors import DistutilsExecError |