diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2011-08-19 14:57:02 +0300 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-04-29 21:38:29 -0600 |
commit | 56b3e0c9effb03f82fc4b8d67e3563248c136b09 (patch) | |
tree | 11588a95ee3a0d442587d7b1994ad92c8f281ddd | |
parent | 6f703d57b572732e3a5a4f845172404ab683cf02 (diff) | |
download | numpy-56b3e0c9effb03f82fc4b8d67e3563248c136b09.tar.gz |
BLD: Improve reporting of fcompiler value.
follow build_ext coding convention in build_clib to catch strange fcompiler
value reported in ml.
-rw-r--r-- | numpy/distutils/command/build_clib.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/numpy/distutils/command/build_clib.py b/numpy/distutils/command/build_clib.py index e68b97058..d9cfca73e 100644 --- a/numpy/distutils/command/build_clib.py +++ b/numpy/distutils/command/build_clib.py @@ -81,21 +81,23 @@ class build_clib(old_build_clib): if self.have_f_sources(): from numpy.distutils.fcompiler import new_fcompiler - self.fcompiler = new_fcompiler(compiler=self.fcompiler, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force, - requiref90='f90' in languages, - c_compiler=self.compiler) - if self.fcompiler is not None: - self.fcompiler.customize(self.distribution) + self._f_compiler = new_fcompiler(compiler=self.fcompiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force, + requiref90='f90' in languages, + c_compiler=self.compiler) + if self._f_compiler is not None: + self._f_compiler.customize(self.distribution) libraries = self.libraries self.libraries = None - self.fcompiler.customize_cmd(self) + self._f_compiler.customize_cmd(self) self.libraries = libraries - self.fcompiler.show_customization() + self._f_compiler.show_customization() + else: + self._f_compiler = None self.build_libraries(self.libraries) @@ -121,7 +123,7 @@ class build_clib(old_build_clib): def build_a_library(self, build_info, lib_name, libraries): # default compilers compiler = self.compiler - fcompiler = self.fcompiler + fcompiler = self._f_compiler sources = build_info.get('sources') if sources is None or not is_sequence(sources): @@ -237,7 +239,7 @@ class build_clib(old_build_clib): debug=self.debug, extra_postargs=extra_postargs) - if requiref90 and self.fcompiler.module_dir_switch is None: + if requiref90 and self._f_compiler.module_dir_switch is None: # move new compiled F90 module files to module_build_dir for f in glob('*.mod'): if f in existing_modules: |