~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/distutils/fcompiler/g95.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# http://g95.sourceforge.net/
 
2
 
 
3
import os
 
4
import sys
 
5
 
 
6
from numpy.distutils.cpuinfo import cpu
 
7
from numpy.distutils.fcompiler import FCompiler
 
8
 
 
9
class G95FCompiler(FCompiler):
 
10
 
 
11
    compiler_type = 'g95'
 
12
    version_pattern = r'G95.*\(experimental\) \(g95!\) (?P<version>.*)\).*'
 
13
 
 
14
    executables = {
 
15
        'version_cmd'  : ["g95", "--version"],
 
16
        'compiler_f77' : ["g95", "-ffixed-form"],
 
17
        'compiler_fix' : ["g95", "-ffixed-form"],
 
18
        'compiler_f90' : ["g95"],
 
19
        'linker_so'    : ["g95","-shared"],
 
20
        'archiver'     : ["ar", "-cr"],
 
21
        'ranlib'       : ["ranlib"]
 
22
        }
 
23
    pic_flags = ['-fpic']
 
24
    module_dir_switch = '-fmod='
 
25
    module_include_switch = '-I'
 
26
 
 
27
    def get_flags(self):
 
28
        return ['-fno-second-underscore']
 
29
    def get_flags_opt(self):
 
30
        return ['-O']
 
31
    def get_flags_debug(self):
 
32
        return ['-g']
 
33
 
 
34
if __name__ == '__main__':
 
35
    from distutils import log
 
36
    log.set_verbosity(2)
 
37
    from numpy.distutils.fcompiler import new_fcompiler
 
38
    #compiler = new_fcompiler(compiler='g95')
 
39
    compiler = G95FCompiler()
 
40
    compiler.customize()
 
41
    print compiler.get_version()