comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/vast.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.gnu import GnuFCompiler
6
7 compilers = ['VastFCompiler']
8
9 class VastFCompiler(GnuFCompiler):
10 compiler_type = 'vast'
11 compiler_aliases = ()
12 description = 'Pacific-Sierra Research Fortran 90 Compiler'
13 version_pattern = r'\s*Pacific-Sierra Research vf90 '\
14 '(Personal|Professional)\s+(?P<version>[^\s]*)'
15
16 # VAST f90 does not support -o with -c. So, object files are created
17 # to the current directory and then moved to build directory
18 object_switch = ' && function _mvfile { mv -v `basename $1` $1 ; } && _mvfile '
19
20 executables = {
21 'version_cmd' : ["vf90", "-v"],
22 'compiler_f77' : ["g77"],
23 'compiler_fix' : ["f90", "-Wv,-ya"],
24 'compiler_f90' : ["f90"],
25 'linker_so' : ["<F90>"],
26 'archiver' : ["ar", "-cr"],
27 'ranlib' : ["ranlib"]
28 }
29 module_dir_switch = None #XXX Fix me
30 module_include_switch = None #XXX Fix me
31
32 def find_executables(self):
33 pass
34
35 def get_version_cmd(self):
36 f90 = self.compiler_f90[0]
37 d, b = os.path.split(f90)
38 vf90 = os.path.join(d, 'v'+b)
39 return vf90
40
41 def get_flags_arch(self):
42 vast_version = self.get_version()
43 gnu = GnuFCompiler()
44 gnu.customize(None)
45 self.version = gnu.get_version()
46 opt = GnuFCompiler.get_flags_arch(self)
47 self.version = vast_version
48 return opt
49
50 if __name__ == '__main__':
51 from distutils import log
52 log.set_verbosity(2)
53 from numpy.distutils.fcompiler import new_fcompiler
54 compiler = new_fcompiler(compiler='vast')
55 compiler.customize()
56 print(compiler.get_version())