summaryrefslogtreecommitdiff
path: root/scipy_distutils/nagfcompiler.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2004-01-19 09:00:01 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2004-01-19 09:00:01 +0000
commitc879ef7d77eb19cb4d795e4550573de9c58955b4 (patch)
tree1f4fefca21b78e13a10f133a5df586faa799347a /scipy_distutils/nagfcompiler.py
parent60612a648d3b108daf597dfbaee57c316fb0775f (diff)
downloadnumpy-c879ef7d77eb19cb4d795e4550573de9c58955b4.tar.gz
Refactoring build_flib.py (to follow and use standard distutils conventions and tools). It's work in-progress. Sending the output of 'python fcompiler.py --verbose' would be a great help if you have other than intel and gnu compilers installed.
Diffstat (limited to 'scipy_distutils/nagfcompiler.py')
-rw-r--r--scipy_distutils/nagfcompiler.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/scipy_distutils/nagfcompiler.py b/scipy_distutils/nagfcompiler.py
new file mode 100644
index 000000000..b9c1f354d
--- /dev/null
+++ b/scipy_distutils/nagfcompiler.py
@@ -0,0 +1,35 @@
+import os
+import sys
+
+from cpuinfo import cpu
+from fcompiler import FCompiler
+
+class NAGFCompiler(FCompiler):
+
+ compiler_type = 'nag'
+ version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)'
+
+ executables = {
+ 'version_cmd' : ["f95", "-V"],
+ 'compiler_f77' : ["f95", "-fixed"],
+ 'compiler_fix' : ["f95", "-fixed"],
+ 'compiler_f90' : ["f95"],
+ 'linker_so' : ["f95","-Wl,shared"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+
+ def get_flags_opt(self):
+ return ['-O4']
+ def get_flags_arch(self):
+ return ['-target=native']
+ def get_flags_debug(self):
+ return ['-g','-gline','-g90','-nan','-C']
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(2)
+ from fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='nag')
+ compiler.customize()
+ print compiler.get_version()