Chris@87: from __future__ import division, absolute_import, print_function Chris@87: Chris@87: from numpy.distutils.fcompiler import FCompiler Chris@87: Chris@87: compilers = ['PathScaleFCompiler'] Chris@87: Chris@87: class PathScaleFCompiler(FCompiler): Chris@87: Chris@87: compiler_type = 'pathf95' Chris@87: description = 'PathScale Fortran Compiler' Chris@87: version_pattern = r'PathScale\(TM\) Compiler Suite: Version (?P[\d.]+)' Chris@87: Chris@87: executables = { Chris@87: 'version_cmd' : ["pathf95", "-version"], Chris@87: 'compiler_f77' : ["pathf95", "-fixedform"], Chris@87: 'compiler_fix' : ["pathf95", "-fixedform"], Chris@87: 'compiler_f90' : ["pathf95"], Chris@87: 'linker_so' : ["pathf95", "-shared"], Chris@87: 'archiver' : ["ar", "-cr"], Chris@87: 'ranlib' : ["ranlib"] Chris@87: } Chris@87: pic_flags = ['-fPIC'] Chris@87: module_dir_switch = '-module ' # Don't remove ending space! Chris@87: module_include_switch = '-I' Chris@87: Chris@87: def get_flags_opt(self): Chris@87: return ['-O3'] Chris@87: def get_flags_debug(self): Chris@87: return ['-g'] Chris@87: Chris@87: if __name__ == '__main__': Chris@87: from distutils import log Chris@87: log.set_verbosity(2) Chris@87: #compiler = PathScaleFCompiler() Chris@87: from numpy.distutils.fcompiler import new_fcompiler Chris@87: compiler = new_fcompiler(compiler='pathf95') Chris@87: compiler.customize() Chris@87: print(compiler.get_version())