@@ -81,21 +81,23 @@ def run(self):
8181
8282 if self .have_f_sources ():
8383 from numpy .distutils .fcompiler import new_fcompiler
84- self .fcompiler = new_fcompiler (compiler = self .fcompiler ,
85- verbose = self .verbose ,
86- dry_run = self .dry_run ,
87- force = self .force ,
88- requiref90 = 'f90' in languages ,
89- c_compiler = self .compiler )
90- if self .fcompiler is not None :
91- self .fcompiler .customize (self .distribution )
84+ self ._f_compiler = new_fcompiler (compiler = self .fcompiler ,
85+ verbose = self .verbose ,
86+ dry_run = self .dry_run ,
87+ force = self .force ,
88+ requiref90 = 'f90' in languages ,
89+ c_compiler = self .compiler )
90+ if self ._f_compiler is not None :
91+ self ._f_compiler .customize (self .distribution )
9292
9393 libraries = self .libraries
9494 self .libraries = None
95- self .fcompiler .customize_cmd (self )
95+ self ._f_compiler .customize_cmd (self )
9696 self .libraries = libraries
9797
98- self .fcompiler .show_customization ()
98+ self ._f_compiler .show_customization ()
99+ else :
100+ self ._f_compiler = None
99101
100102 self .build_libraries (self .libraries )
101103
@@ -121,7 +123,7 @@ def build_libraries(self, libraries):
121123 def build_a_library (self , build_info , lib_name , libraries ):
122124 # default compilers
123125 compiler = self .compiler
124- fcompiler = self .fcompiler
126+ fcompiler = self ._f_compiler
125127
126128 sources = build_info .get ('sources' )
127129 if sources is None or not is_sequence (sources ):
@@ -237,7 +239,7 @@ def build_a_library(self, build_info, lib_name, libraries):
237239 debug = self .debug ,
238240 extra_postargs = extra_postargs )
239241
240- if requiref90 and self .fcompiler .module_dir_switch is None :
242+ if requiref90 and self ._f_compiler .module_dir_switch is None :
241243 # move new compiled F90 module files to module_build_dir
242244 for f in glob ('*.mod' ):
243245 if f in existing_modules :
0 commit comments