comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/g95.py @ 87:2a2c65a20a8b

Add Python libs and headers
author Chris Cannam
date Wed, 25 Feb 2015 14:05:22 +0000
parents
children
comparison
equal deleted inserted replaced
86:413a9d26189e 87:2a2c65a20a8b
1 # http://g95.sourceforge.net/
2 from __future__ import division, absolute_import, print_function
3
4 from numpy.distutils.fcompiler import FCompiler
5
6 compilers = ['G95FCompiler']
7
8 class G95FCompiler(FCompiler):
9 compiler_type = 'g95'
10 description = 'G95 Fortran Compiler'
11
12 # version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95!\) (?P<version>.*)\).*'
13 # $ g95 --version
14 # G95 (GCC 4.0.3 (g95!) May 22 2006)
15
16 version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95 (?P<version>.*)!\) (?P<date>.*)\).*'
17 # $ g95 --version
18 # G95 (GCC 4.0.3 (g95 0.90!) Aug 22 2006)
19
20 executables = {
21 'version_cmd' : ["<F90>", "--version"],
22 'compiler_f77' : ["g95", "-ffixed-form"],
23 'compiler_fix' : ["g95", "-ffixed-form"],
24 'compiler_f90' : ["g95"],
25 'linker_so' : ["<F90>", "-shared"],
26 'archiver' : ["ar", "-cr"],
27 'ranlib' : ["ranlib"]
28 }
29 pic_flags = ['-fpic']
30 module_dir_switch = '-fmod='
31 module_include_switch = '-I'
32
33 def get_flags(self):
34 return ['-fno-second-underscore']
35 def get_flags_opt(self):
36 return ['-O']
37 def get_flags_debug(self):
38 return ['-g']
39
40 if __name__ == '__main__':
41 from distutils import log
42 log.set_verbosity(2)
43 compiler = G95FCompiler()
44 compiler.customize()
45 print(compiler.get_version())