annotate DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/nag.py @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2a2c65a20a8b
children
rev   line source
Chris@87 1 from __future__ import division, absolute_import, print_function
Chris@87 2
Chris@87 3 import sys
Chris@87 4 from numpy.distutils.fcompiler import FCompiler
Chris@87 5
Chris@87 6 compilers = ['NAGFCompiler']
Chris@87 7
Chris@87 8 class NAGFCompiler(FCompiler):
Chris@87 9
Chris@87 10 compiler_type = 'nag'
Chris@87 11 description = 'NAGWare Fortran 95 Compiler'
Chris@87 12 version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)'
Chris@87 13
Chris@87 14 executables = {
Chris@87 15 'version_cmd' : ["<F90>", "-V"],
Chris@87 16 'compiler_f77' : ["f95", "-fixed"],
Chris@87 17 'compiler_fix' : ["f95", "-fixed"],
Chris@87 18 'compiler_f90' : ["f95"],
Chris@87 19 'linker_so' : ["<F90>"],
Chris@87 20 'archiver' : ["ar", "-cr"],
Chris@87 21 'ranlib' : ["ranlib"]
Chris@87 22 }
Chris@87 23
Chris@87 24 def get_flags_linker_so(self):
Chris@87 25 if sys.platform=='darwin':
Chris@87 26 return ['-unsharedf95', '-Wl,-bundle,-flat_namespace,-undefined,suppress']
Chris@87 27 return ["-Wl,-shared"]
Chris@87 28 def get_flags_opt(self):
Chris@87 29 return ['-O4']
Chris@87 30 def get_flags_arch(self):
Chris@87 31 version = self.get_version()
Chris@87 32 if version and version < '5.1':
Chris@87 33 return ['-target=native']
Chris@87 34 else:
Chris@87 35 return ['']
Chris@87 36 def get_flags_debug(self):
Chris@87 37 return ['-g', '-gline', '-g90', '-nan', '-C']
Chris@87 38
Chris@87 39 if __name__ == '__main__':
Chris@87 40 from distutils import log
Chris@87 41 log.set_verbosity(2)
Chris@87 42 from numpy.distutils.fcompiler import new_fcompiler
Chris@87 43 compiler = new_fcompiler(compiler='nag')
Chris@87 44 compiler.customize()
Chris@87 45 print(compiler.get_version())