diff options
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r-- | numpy/distutils/fcompiler/__init__.py | 102 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/absoft.py | 22 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/compaq.py | 20 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/g95.py | 2 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/gnu.py | 2 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/hpux.py | 4 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/ibm.py | 8 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/intel.py | 14 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/lahey.py | 6 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/mips.py | 4 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/nag.py | 4 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/none.py | 16 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/pg.py | 4 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/sun.py | 6 |
14 files changed, 107 insertions, 107 deletions
diff --git a/numpy/distutils/fcompiler/__init__.py b/numpy/distutils/fcompiler/__init__.py index 37852b0fb..d00228dcd 100644 --- a/numpy/distutils/fcompiler/__init__.py +++ b/numpy/distutils/fcompiler/__init__.py @@ -15,7 +15,7 @@ But note that FCompiler.executables is actually a dictionary of commands. """ from __future__ import division, absolute_import, print_function -__all__ = ['FCompiler','new_fcompiler','show_fcompilers', +__all__ = ['FCompiler', 'new_fcompiler', 'show_fcompilers', 'dummy_fortran_file'] import os @@ -144,16 +144,16 @@ class FCompiler(CCompiler): ar = ('flags.ar', 'ARFLAGS', 'arflags', flaglist), ) - language_map = {'.f':'f77', - '.for':'f77', - '.F':'f77', # XXX: needs preprocessor - '.ftn':'f77', - '.f77':'f77', - '.f90':'f90', - '.F90':'f90', # XXX: needs preprocessor - '.f95':'f90', + language_map = {'.f': 'f77', + '.for': 'f77', + '.F': 'f77', # XXX: needs preprocessor + '.ftn': 'f77', + '.f77': 'f77', + '.f90': 'f90', + '.F90': 'f90', # XXX: needs preprocessor + '.f95': 'f90', } - language_order = ['f90','f77'] + language_order = ['f90', 'f77'] # These will be set by the subclass @@ -164,14 +164,14 @@ class FCompiler(CCompiler): possible_executables = [] executables = { - 'version_cmd' : ["f77", "-v"], - 'compiler_f77' : ["f77"], - 'compiler_f90' : ["f90"], - 'compiler_fix' : ["f90", "-fixed"], - 'linker_so' : ["f90", "-shared"], - 'linker_exe' : ["f90"], - 'archiver' : ["ar", "-cr"], - 'ranlib' : None, + 'version_cmd': ["f77", "-v"], + 'compiler_f77': ["f77"], + 'compiler_f90': ["f90"], + 'compiler_fix': ["f90", "-fixed"], + 'linker_so': ["f90", "-shared"], + 'linker_exe': ["f90"], + 'archiver': ["ar", "-cr"], + 'ranlib': None, } # If compiler does not support compiling Fortran 90 then it can @@ -196,7 +196,7 @@ class FCompiler(CCompiler): pic_flags = [] # Flags to create position-independent code - src_extensions = ['.for','.ftn','.f77','.f','.f90','.f95','.F','.F90'] + src_extensions = ['.for', '.ftn', '.f77', '.f', '.f90', '.f95', '.F', '.F90'] obj_extension = ".o" shared_lib_extension = get_shared_lib_extension() @@ -543,10 +543,10 @@ class FCompiler(CCompiler): """Print out the attributes of a compiler instance.""" props = [] for key in list(self.executables.keys()) + \ - ['version','libraries','library_dirs', - 'object_switch','compile_switch']: - if hasattr(self,key): - v = getattr(self,key) + ['version', 'libraries', 'library_dirs', + 'object_switch', 'compile_switch']: + if hasattr(self, key): + v = getattr(self, key) props.append((key, None, '= '+repr(v))) props.sort() @@ -572,17 +572,17 @@ class FCompiler(CCompiler): compiler = self.compiler_f90 if compiler is None: raise DistutilsExecError('f90 not supported by %s needed for %s'\ - % (self.__class__.__name__,src)) + % (self.__class__.__name__, src)) extra_compile_args = self.extra_f90_compile_args or [] else: flavor = ':fix' compiler = self.compiler_fix if compiler is None: raise DistutilsExecError('f90 (fixed) not supported by %s needed for %s'\ - % (self.__class__.__name__,src)) + % (self.__class__.__name__, src)) extra_compile_args = self.extra_f90_compile_args or [] if self.object_switch[-1]==' ': - o_args = [self.object_switch.strip(),obj] + o_args = [self.object_switch.strip(), obj] else: o_args = [self.object_switch.strip()+obj] @@ -593,7 +593,7 @@ class FCompiler(CCompiler): log.info('extra %s options: %r' \ % (flavor[1:], ' '.join(extra_compile_args))) - extra_flags = src_flags.get(self.compiler_type,[]) + extra_flags = src_flags.get(self.compiler_type, []) if extra_flags: log.info('using compile options from source: %r' \ % ' '.join(extra_flags)) @@ -604,7 +604,7 @@ class FCompiler(CCompiler): display = '%s: %s' % (os.path.basename(compiler[0]) + flavor, src) try: - self.spawn(command,display=display) + self.spawn(command, display=display) except DistutilsExecError: msg = str(get_exception()) raise CompileError(msg) @@ -613,18 +613,18 @@ class FCompiler(CCompiler): options = [] if self.module_dir_switch is not None: if self.module_dir_switch[-1]==' ': - options.extend([self.module_dir_switch.strip(),module_build_dir]) + options.extend([self.module_dir_switch.strip(), module_build_dir]) else: options.append(self.module_dir_switch.strip()+module_build_dir) else: print('XXX: module_build_dir=%r option ignored' % (module_build_dir)) - print('XXX: Fix module_dir_switch for ',self.__class__.__name__) + print('XXX: Fix module_dir_switch for ', self.__class__.__name__) if self.module_include_switch is not None: for d in [module_build_dir]+module_dirs: options.append('%s%s' % (self.module_include_switch, d)) else: print('XXX: module_dirs=%r option ignored' % (module_dirs)) - print('XXX: Fix module_include_switch for ',self.__class__.__name__) + print('XXX: Fix module_include_switch for ', self.__class__.__name__) return options def library_option(self, lib): @@ -650,7 +650,7 @@ class FCompiler(CCompiler): if self._need_link(objects, output_filename): if self.library_switch[-1]==' ': - o_args = [self.library_switch.strip(),output_filename] + o_args = [self.library_switch.strip(), output_filename] else: o_args = [self.library_switch.strip()+output_filename] @@ -705,19 +705,19 @@ class FCompiler(CCompiler): _default_compilers = ( # sys.platform mappings - ('win32', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95', + ('win32', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem')), - ('cygwin.*', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')), - ('linux.*', ('gnu95','intel','lahey','pg','absoft','nag','vast','compaq', - 'intele','intelem','gnu','g95','pathf95')), + ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), + ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', + 'intele', 'intelem', 'gnu', 'g95', 'pathf95')), ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), - ('sunos.*', ('sun','gnu','gnu95','g95')), - ('irix.*', ('mips','gnu','gnu95',)), - ('aix.*', ('ibm','gnu','gnu95',)), + ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), + ('irix.*', ('mips', 'gnu', 'gnu95',)), + ('aix.*', ('ibm', 'gnu', 'gnu95',)), # os.name mappings - ('posix', ('gnu','gnu95',)), - ('nt', ('gnu','gnu95',)), - ('mac', ('gnu95','gnu','pg')), + ('posix', ('gnu', 'gnu95',)), + ('nt', ('gnu', 'gnu95',)), + ('mac', ('gnu95', 'gnu', 'pg')), ) fcompiler_class = None @@ -925,18 +925,18 @@ def dummy_fortran_file(): return name[:-2] -is_f_file = re.compile(r'.*[.](for|ftn|f77|f)\Z',re.I).match -_has_f_header = re.compile(r'-[*]-\s*fortran\s*-[*]-',re.I).search -_has_f90_header = re.compile(r'-[*]-\s*f90\s*-[*]-',re.I).search -_has_fix_header = re.compile(r'-[*]-\s*fix\s*-[*]-',re.I).search -_free_f90_start = re.compile(r'[^c*!]\s*[^\s\d\t]',re.I).match +is_f_file = re.compile(r'.*[.](for|ftn|f77|f)\Z', re.I).match +_has_f_header = re.compile(r'-[*]-\s*fortran\s*-[*]-', re.I).search +_has_f90_header = re.compile(r'-[*]-\s*f90\s*-[*]-', re.I).search +_has_fix_header = re.compile(r'-[*]-\s*fix\s*-[*]-', re.I).search +_free_f90_start = re.compile(r'[^c*!]\s*[^\s\d\t]', re.I).match def is_free_format(file): """Check if file is in free format Fortran.""" # f90 allows both fixed and free format, assuming fixed unless # signs of free format are detected. result = 0 - f = open_latin1(file,'r') + f = open_latin1(file, 'r') line = f.readline() n = 10000 # the number of non-comment lines to scan for hints if _has_f_header(line): @@ -956,12 +956,12 @@ def is_free_format(file): return result def has_f90_header(src): - f = open_latin1(src,'r') + f = open_latin1(src, 'r') line = f.readline() f.close() return _has_f90_header(line) or _has_fix_header(line) -_f77flags_re = re.compile(r'(c|)f77flags\s*\(\s*(?P<fcname>\w+)\s*\)\s*=\s*(?P<fflags>.*)',re.I) +_f77flags_re = re.compile(r'(c|)f77flags\s*\(\s*(?P<fcname>\w+)\s*\)\s*=\s*(?P<fflags>.*)', re.I) def get_f77flags(src): """ Search the first 20 lines of fortran 77 code for line pattern @@ -969,7 +969,7 @@ def get_f77flags(src): Return a dictionary {<fcompiler type>:<f77 flags>}. """ flags = {} - f = open_latin1(src,'r') + f = open_latin1(src, 'r') i = 0 for line in f: i += 1 diff --git a/numpy/distutils/fcompiler/absoft.py b/numpy/distutils/fcompiler/absoft.py index 03430fb0e..bde0529be 100644 --- a/numpy/distutils/fcompiler/absoft.py +++ b/numpy/distutils/fcompiler/absoft.py @@ -61,12 +61,12 @@ class AbsoftFCompiler(FCompiler): elif self.get_version() >= '9.0': opt = ['-shared'] else: - opt = ["-K","shared"] + opt = ["-K", "shared"] return opt def library_dir_option(self, dir): if os.name=='nt': - return ['-link','/PATH:"%s"' % (dir)] + return ['-link', '/PATH:"%s"' % (dir)] return "-L" + dir def library_option(self, lib): @@ -97,9 +97,9 @@ class AbsoftFCompiler(FCompiler): elif self.get_version() >= '10.0': opt.extend(['af90math', 'afio', 'af77math', 'U77']) elif self.get_version() >= '8.0': - opt.extend(['f90math','fio','f77math','U77']) + opt.extend(['f90math', 'fio', 'f77math', 'U77']) else: - opt.extend(['fio','f90math','fmath','U77']) + opt.extend(['fio', 'f90math', 'fmath', 'U77']) if os.name =='nt': opt.append('COMDLG32') return opt @@ -115,11 +115,11 @@ class AbsoftFCompiler(FCompiler): def get_flags_f77(self): opt = FCompiler.get_flags_f77(self) - opt.extend(['-N22','-N90','-N110']) + opt.extend(['-N22', '-N90', '-N110']) v = self.get_version() if os.name == 'nt': if v and v>='8.0': - opt.extend(['-f','-N15']) + opt.extend(['-f', '-N15']) else: opt.append('-f') if v: @@ -133,8 +133,8 @@ class AbsoftFCompiler(FCompiler): def get_flags_f90(self): opt = FCompiler.get_flags_f90(self) - opt.extend(["-YCFRL=1","-YCOM_NAMES=LCS","-YCOM_PFX","-YEXT_PFX", - "-YCOM_SFX=_","-YEXT_SFX=_","-YEXT_NAMES=LCS"]) + opt.extend(["-YCFRL=1", "-YCOM_NAMES=LCS", "-YCOM_PFX", "-YEXT_PFX", + "-YCOM_SFX=_", "-YEXT_SFX=_", "-YEXT_NAMES=LCS"]) if self.get_version(): if self.get_version()>'4.6': opt.extend(["-YDEALLOC=ALL"]) @@ -142,9 +142,9 @@ class AbsoftFCompiler(FCompiler): def get_flags_fix(self): opt = FCompiler.get_flags_fix(self) - opt.extend(["-YCFRL=1","-YCOM_NAMES=LCS","-YCOM_PFX","-YEXT_PFX", - "-YCOM_SFX=_","-YEXT_SFX=_","-YEXT_NAMES=LCS"]) - opt.extend(["-f","fixed"]) + opt.extend(["-YCFRL=1", "-YCOM_NAMES=LCS", "-YCOM_PFX", "-YEXT_PFX", + "-YCOM_SFX=_", "-YEXT_SFX=_", "-YEXT_NAMES=LCS"]) + opt.extend(["-f", "fixed"]) return opt def get_flags_opt(self): diff --git a/numpy/distutils/fcompiler/compaq.py b/numpy/distutils/fcompiler/compaq.py index 3831f88f7..5162b168c 100644 --- a/numpy/distutils/fcompiler/compaq.py +++ b/numpy/distutils/fcompiler/compaq.py @@ -29,7 +29,7 @@ class CompaqFCompiler(FCompiler): executables = { 'version_cmd' : ['<F90>', "-version"], - 'compiler_f77' : [fc_exe, "-f77rtl","-fixed"], + 'compiler_f77' : [fc_exe, "-f77rtl", "-fixed"], 'compiler_fix' : [fc_exe, "-fixed"], 'compiler_f90' : [fc_exe], 'linker_so' : ['<F90>'], @@ -41,18 +41,18 @@ class CompaqFCompiler(FCompiler): module_include_switch = '-I' def get_flags(self): - return ['-assume no2underscore','-nomixed_str_len_arg'] + return ['-assume no2underscore', '-nomixed_str_len_arg'] def get_flags_debug(self): - return ['-g','-check bounds'] + return ['-g', '-check bounds'] def get_flags_opt(self): - return ['-O4','-align dcommons','-assume bigarrays', - '-assume nozsize','-math_library fast'] + return ['-O4', '-align dcommons', '-assume bigarrays', + '-assume nozsize', '-math_library fast'] def get_flags_arch(self): return ['-arch host', '-tune host'] def get_flags_linker_so(self): if sys.platform[:5]=='linux': return ['-shared'] - return ['-shared','-Wl,-expect_unresolved,*'] + return ['-shared', '-Wl,-expect_unresolved,*'] class CompaqVisualFCompiler(FCompiler): @@ -101,7 +101,7 @@ class CompaqVisualFCompiler(FCompiler): executables = { 'version_cmd' : ['<F90>', "/what"], - 'compiler_f77' : [fc_exe, "/f77rtl","/fixed"], + 'compiler_f77' : [fc_exe, "/f77rtl", "/fixed"], 'compiler_fix' : [fc_exe, "/fixed"], 'compiler_f90' : [fc_exe], 'linker_so' : ['<F90>'], @@ -110,10 +110,10 @@ class CompaqVisualFCompiler(FCompiler): } def get_flags(self): - return ['/nologo','/MD','/WX','/iface=(cref,nomixed_str_len_arg)', - '/names:lowercase','/assume:underscore'] + return ['/nologo', '/MD', '/WX', '/iface=(cref,nomixed_str_len_arg)', + '/names:lowercase', '/assume:underscore'] def get_flags_opt(self): - return ['/Ox','/fast','/optimize:5','/unroll:0','/math_library:fast'] + return ['/Ox', '/fast', '/optimize:5', '/unroll:0', '/math_library:fast'] def get_flags_arch(self): return ['/threads'] def get_flags_debug(self): diff --git a/numpy/distutils/fcompiler/g95.py b/numpy/distutils/fcompiler/g95.py index 20c2c0d03..26f73b530 100644 --- a/numpy/distutils/fcompiler/g95.py +++ b/numpy/distutils/fcompiler/g95.py @@ -22,7 +22,7 @@ class G95FCompiler(FCompiler): 'compiler_f77' : ["g95", "-ffixed-form"], 'compiler_fix' : ["g95", "-ffixed-form"], 'compiler_f90' : ["g95"], - 'linker_so' : ["<F90>","-shared"], + 'linker_so' : ["<F90>", "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 3402319e0..5ee3df2dc 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -170,7 +170,7 @@ class GnuFCompiler(FCompiler): if d is not None: g2c = self.g2c + '-pic' f = self.static_lib_format % (g2c, self.static_lib_extension) - if not os.path.isfile(os.path.join(d,f)): + if not os.path.isfile(os.path.join(d, f)): g2c = self.g2c else: g2c = self.g2c diff --git a/numpy/distutils/fcompiler/hpux.py b/numpy/distutils/fcompiler/hpux.py index 5560e199a..9004961e1 100644 --- a/numpy/distutils/fcompiler/hpux.py +++ b/numpy/distutils/fcompiler/hpux.py @@ -31,10 +31,10 @@ class HPUXFCompiler(FCompiler): def get_library_dirs(self): opt = ['/usr/lib/hpux64'] return opt - def get_version(self, force=0, ok_status=[256,0,1]): + def get_version(self, force=0, ok_status=[256, 0, 1]): # XXX status==256 may indicate 'unrecognized option' or # 'no input file'. So, version_cmd needs more work. - return FCompiler.get_version(self,force,ok_status) + return FCompiler.get_version(self, force, ok_status) if __name__ == '__main__': from distutils import log diff --git a/numpy/distutils/fcompiler/ibm.py b/numpy/distutils/fcompiler/ibm.py index e5061bd18..cc65df972 100644 --- a/numpy/distutils/fcompiler/ibm.py +++ b/numpy/distutils/fcompiler/ibm.py @@ -35,7 +35,7 @@ class IBMFCompiler(FCompiler): lslpp = find_executable('lslpp') xlf = find_executable('xlf') if os.path.exists(xlf) and os.path.exists(lslpp): - s,o = exec_command(lslpp + ' -Lc xlfcmp') + s, o = exec_command(lslpp + ' -Lc xlfcmp') m = re.search('xlfcmp:(?P<version>\d+([.]\d+)+)', o) if m: version = m.group('version') @@ -47,7 +47,7 @@ class IBMFCompiler(FCompiler): # let's try another method: l = sorted(os.listdir(xlf_dir)) l.reverse() - l = [d for d in l if os.path.isfile(os.path.join(xlf_dir,d,'xlf.cfg'))] + l = [d for d in l if os.path.isfile(os.path.join(xlf_dir, d, 'xlf.cfg'))] if l: from distutils.version import LooseVersion self.version = version = LooseVersion(l[0]) @@ -65,7 +65,7 @@ class IBMFCompiler(FCompiler): opt.append('-Wl,-bundle,-flat_namespace,-undefined,suppress') else: opt.append('-bshared') - version = self.get_version(ok_status=[0,40]) + version = self.get_version(ok_status=[0, 40]) if version is not None: if sys.platform.startswith('aix'): xlf_cfg = '/etc/xlf.cfg' @@ -73,7 +73,7 @@ class IBMFCompiler(FCompiler): xlf_cfg = '/etc/opt/ibmcmp/xlf/%s/xlf.cfg' % version fo, new_cfg = make_temp_file(suffix='_xlf.cfg') log.info('Creating '+new_cfg) - fi = open(xlf_cfg,'r') + fi = open(xlf_cfg, 'r') crt1_match = re.compile(r'\s*crt\s*[=]\s*(?P<path>.*)/crt1.o').match for line in fi: m = crt1_match(line) diff --git a/numpy/distutils/fcompiler/intel.py b/numpy/distutils/fcompiler/intel.py index f6aa687a8..21a3c5eaf 100644 --- a/numpy/distutils/fcompiler/intel.py +++ b/numpy/distutils/fcompiler/intel.py @@ -137,8 +137,8 @@ class IntelVisualFCompiler(BaseIntelFCompiler): executables = { 'version_cmd' : None, - 'compiler_f77' : [None,"-FI","-w90","-w95"], - 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_fix' : [None, "-FI", "-4L72", "-w"], 'compiler_f90' : [None], 'linker_so' : ['<F90>', "-shared"], 'archiver' : [ar_exe, "/verbose", "/OUT:"], @@ -152,14 +152,14 @@ class IntelVisualFCompiler(BaseIntelFCompiler): module_include_switch = '/I' def get_flags(self): - opt = ['/nologo','/MD','/nbs','/Qlowercase','/us'] + opt = ['/nologo', '/MD', '/nbs', '/Qlowercase', '/us'] return opt def get_flags_free(self): return ["-FR"] def get_flags_debug(self): - return ['/4Yb','/d2'] + return ['/4Yb', '/d2'] def get_flags_opt(self): return ['/O2'] @@ -178,10 +178,10 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler): executables = { 'version_cmd' : None, - 'compiler_f77' : [None,"-FI","-w90","-w95"], - 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_fix' : [None, "-FI", "-4L72", "-w"], 'compiler_f90' : [None], - 'linker_so' : ['<F90>',"-shared"], + 'linker_so' : ['<F90>', "-shared"], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } diff --git a/numpy/distutils/fcompiler/lahey.py b/numpy/distutils/fcompiler/lahey.py index afca8e422..7a33b4b63 100644 --- a/numpy/distutils/fcompiler/lahey.py +++ b/numpy/distutils/fcompiler/lahey.py @@ -17,7 +17,7 @@ class LaheyFCompiler(FCompiler): 'compiler_f77' : ["lf95", "--fix"], 'compiler_fix' : ["lf95", "--fix"], 'compiler_f90' : ["lf95"], - 'linker_so' : ["lf95","-shared"], + 'linker_so' : ["lf95", "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -28,12 +28,12 @@ class LaheyFCompiler(FCompiler): def get_flags_opt(self): return ['-O'] def get_flags_debug(self): - return ['-g','--chk','--chkglobal'] + return ['-g', '--chk', '--chkglobal'] def get_library_dirs(self): opt = [] d = os.environ.get('LAHEY') if d: - opt.append(os.path.join(d,'lib')) + opt.append(os.path.join(d, 'lib')) return opt def get_libraries(self): opt = [] diff --git a/numpy/distutils/fcompiler/mips.py b/numpy/distutils/fcompiler/mips.py index 21fa00642..6a8d23099 100644 --- a/numpy/distutils/fcompiler/mips.py +++ b/numpy/distutils/fcompiler/mips.py @@ -16,7 +16,7 @@ class MIPSFCompiler(FCompiler): 'compiler_f77' : ["f77", "-f77"], 'compiler_fix' : ["f90", "-fixedform"], 'compiler_f90' : ["f90"], - 'linker_so' : ["f90","-shared"], + 'linker_so' : ["f90", "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : None } @@ -31,7 +31,7 @@ class MIPSFCompiler(FCompiler): def get_flags_arch(self): opt = [] for a in '19 20 21 22_4k 22_5k 24 25 26 27 28 30 32_5k 32_10k'.split(): - if getattr(cpu,'is_IP%s'%a)(): + if getattr(cpu, 'is_IP%s'%a)(): opt.append('-TARG:platform=IP%s' % a) break return opt diff --git a/numpy/distutils/fcompiler/nag.py b/numpy/distutils/fcompiler/nag.py index b02cf43a6..ae1b96faf 100644 --- a/numpy/distutils/fcompiler/nag.py +++ b/numpy/distutils/fcompiler/nag.py @@ -23,7 +23,7 @@ class NAGFCompiler(FCompiler): def get_flags_linker_so(self): if sys.platform=='darwin': - return ['-unsharedf95','-Wl,-bundle,-flat_namespace,-undefined,suppress'] + return ['-unsharedf95', '-Wl,-bundle,-flat_namespace,-undefined,suppress'] return ["-Wl,-shared"] def get_flags_opt(self): return ['-O4'] @@ -34,7 +34,7 @@ class NAGFCompiler(FCompiler): else: return [''] def get_flags_debug(self): - return ['-g','-gline','-g90','-nan','-C'] + return ['-g', '-gline', '-g90', '-nan', '-C'] if __name__ == '__main__': from distutils import log diff --git a/numpy/distutils/fcompiler/none.py b/numpy/distutils/fcompiler/none.py index 039957233..6f602d734 100644 --- a/numpy/distutils/fcompiler/none.py +++ b/numpy/distutils/fcompiler/none.py @@ -9,14 +9,14 @@ class NoneFCompiler(FCompiler): compiler_type = 'none' description = 'Fake Fortran compiler' - executables = {'compiler_f77' : None, - 'compiler_f90' : None, - 'compiler_fix' : None, - 'linker_so' : None, - 'linker_exe' : None, - 'archiver' : None, - 'ranlib' : None, - 'version_cmd' : None, + executables = {'compiler_f77': None, + 'compiler_f90': None, + 'compiler_fix': None, + 'linker_so': None, + 'linker_exe': None, + 'archiver': None, + 'ranlib': None, + 'version_cmd': None, } def find_executables(self): diff --git a/numpy/distutils/fcompiler/pg.py b/numpy/distutils/fcompiler/pg.py index 1cc201f22..f3f5ea22b 100644 --- a/numpy/distutils/fcompiler/pg.py +++ b/numpy/distutils/fcompiler/pg.py @@ -29,7 +29,7 @@ class PGroupFCompiler(FCompiler): 'compiler_f77' : ["pgfortran"], 'compiler_fix' : ["pgfortran", "-Mfixed"], 'compiler_f90' : ["pgfortran"], - 'linker_so' : ["pgfortran","-shared","-fpic"], + 'linker_so' : ["pgfortran", "-shared", "-fpic"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -40,7 +40,7 @@ class PGroupFCompiler(FCompiler): module_include_switch = '-I' def get_flags(self): - opt = ['-Minform=inform','-Mnosecond_underscore'] + opt = ['-Minform=inform', '-Mnosecond_underscore'] return self.pic_flags + opt def get_flags_opt(self): return ['-fast'] diff --git a/numpy/distutils/fcompiler/sun.py b/numpy/distutils/fcompiler/sun.py index 07d4eeb8e..0955f14a1 100644 --- a/numpy/distutils/fcompiler/sun.py +++ b/numpy/distutils/fcompiler/sun.py @@ -19,7 +19,7 @@ class SunFCompiler(FCompiler): 'compiler_f77' : ["f90"], 'compiler_fix' : ["f90", "-fixed"], 'compiler_f90' : ["f90"], - 'linker_so' : ["<F90>","-Bdynamic","-G"], + 'linker_so' : ["<F90>", "-Bdynamic", "-G"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -35,12 +35,12 @@ class SunFCompiler(FCompiler): ret.append("-fixed") return ret def get_opt(self): - return ['-fast','-dalign'] + return ['-fast', '-dalign'] def get_arch(self): return ['-xtarget=generic'] def get_libraries(self): opt = [] - opt.extend(['fsu','sunmath','mvec']) + opt.extend(['fsu', 'sunmath', 'mvec']) return opt if __name__ == '__main__': |