comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/lahey.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 from __future__ import division, absolute_import, print_function
2
3 import os
4
5 from numpy.distutils.fcompiler import FCompiler
6
7 compilers = ['LaheyFCompiler']
8
9 class LaheyFCompiler(FCompiler):
10
11 compiler_type = 'lahey'
12 description = 'Lahey/Fujitsu Fortran 95 Compiler'
13 version_pattern = r'Lahey/Fujitsu Fortran 95 Compiler Release (?P<version>[^\s*]*)'
14
15 executables = {
16 'version_cmd' : ["<F90>", "--version"],
17 'compiler_f77' : ["lf95", "--fix"],
18 'compiler_fix' : ["lf95", "--fix"],
19 'compiler_f90' : ["lf95"],
20 'linker_so' : ["lf95", "-shared"],
21 'archiver' : ["ar", "-cr"],
22 'ranlib' : ["ranlib"]
23 }
24
25 module_dir_switch = None #XXX Fix me
26 module_include_switch = None #XXX Fix me
27
28 def get_flags_opt(self):
29 return ['-O']
30 def get_flags_debug(self):
31 return ['-g', '--chk', '--chkglobal']
32 def get_library_dirs(self):
33 opt = []
34 d = os.environ.get('LAHEY')
35 if d:
36 opt.append(os.path.join(d, 'lib'))
37 return opt
38 def get_libraries(self):
39 opt = []
40 opt.extend(['fj9f6', 'fj9i6', 'fj9ipp', 'fj9e6'])
41 return opt
42
43 if __name__ == '__main__':
44 from distutils import log
45 log.set_verbosity(2)
46 from numpy.distutils.fcompiler import new_fcompiler
47 compiler = new_fcompiler(compiler='lahey')
48 compiler.customize()
49 print(compiler.get_version())