summaryrefslogtreecommitdiff
path: root/scipy_distutils/fortefcompiler.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/fortefcompiler.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/fortefcompiler.py')
-rw-r--r--scipy_distutils/fortefcompiler.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/scipy_distutils/fortefcompiler.py b/scipy_distutils/fortefcompiler.py
new file mode 100644
index 000000000..37b736c29
--- /dev/null
+++ b/scipy_distutils/fortefcompiler.py
@@ -0,0 +1,37 @@
+import os
+import sys
+
+from cpuinfo import cpu
+from fcompiler import FCompiler
+
+class ForteFCompiler(FCompiler):
+
+ compiler_type = 'forte'
+ version_pattern = r'(f90|f95): Forte Developer 7 Fortran 95 (?P<version>[^\s]+).*'
+
+ executables = {
+ 'version_cmd' : ["f90", "-V"],
+ 'compiler_f77' : ["f90", "-f77", "-ftrap=%none"],
+ 'compiler_fix' : ["f90", "-fixed"],
+ 'compiler_f90' : ["f90"],
+ 'linker_so' : ["f90","-Bdynamic","-G"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+
+ def get_flags(self):
+ return ['-xcode=pic32']
+ def get_opt(self):
+ return ['-fast','-dalign']
+ def get_arch(self):
+ return ['-xtarget=generic']
+ def get_libraries(self):
+ opt = FCompiler.get_libraries(self)
+ opt.extend(['fsu','sunmath','mvec','f77compat'])
+ return opt
+
+if __name__ == '__main__':
+ from fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='forte')
+ compiler.customize()
+ print compiler.get_version()