Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/pg.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://www.pgroup.com | |
2 from __future__ import division, absolute_import, print_function | |
3 | |
4 from numpy.distutils.fcompiler import FCompiler | |
5 from sys import platform | |
6 | |
7 compilers = ['PGroupFCompiler'] | |
8 | |
9 class PGroupFCompiler(FCompiler): | |
10 | |
11 compiler_type = 'pg' | |
12 description = 'Portland Group Fortran Compiler' | |
13 version_pattern = r'\s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*' | |
14 | |
15 if platform == 'darwin': | |
16 executables = { | |
17 'version_cmd' : ["<F77>", "-V"], | |
18 'compiler_f77' : ["pgfortran", "-dynamiclib"], | |
19 'compiler_fix' : ["pgfortran", "-Mfixed", "-dynamiclib"], | |
20 'compiler_f90' : ["pgfortran", "-dynamiclib"], | |
21 'linker_so' : ["libtool"], | |
22 'archiver' : ["ar", "-cr"], | |
23 'ranlib' : ["ranlib"] | |
24 } | |
25 pic_flags = [''] | |
26 else: | |
27 executables = { | |
28 'version_cmd' : ["<F77>", "-V"], | |
29 'compiler_f77' : ["pgfortran"], | |
30 'compiler_fix' : ["pgfortran", "-Mfixed"], | |
31 'compiler_f90' : ["pgfortran"], | |
32 'linker_so' : ["pgfortran", "-shared", "-fpic"], | |
33 'archiver' : ["ar", "-cr"], | |
34 'ranlib' : ["ranlib"] | |
35 } | |
36 pic_flags = ['-fpic'] | |
37 | |
38 | |
39 module_dir_switch = '-module ' | |
40 module_include_switch = '-I' | |
41 | |
42 def get_flags(self): | |
43 opt = ['-Minform=inform', '-Mnosecond_underscore'] | |
44 return self.pic_flags + opt | |
45 def get_flags_opt(self): | |
46 return ['-fast'] | |
47 def get_flags_debug(self): | |
48 return ['-g'] | |
49 | |
50 if platform == 'darwin': | |
51 def get_flags_linker_so(self): | |
52 return ["-dynamic", '-undefined', 'dynamic_lookup'] | |
53 | |
54 if __name__ == '__main__': | |
55 from distutils import log | |
56 log.set_verbosity(2) | |
57 from numpy.distutils.fcompiler import new_fcompiler | |
58 compiler = new_fcompiler(compiler='pg') | |
59 compiler.customize() | |
60 print(compiler.get_version()) |