summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorrgommers <ralf.gommers@googlemail.com>2010-11-30 22:14:37 +0800
committerCharles Harris <charlesr.harris@gmail.com>2010-12-02 08:40:41 -0700
commit8d0b5817a3fd4f3ce465aba2fd0ddd30677b8e60 (patch)
treec8a4e3748dd22bef40c10e4770654023a65b2a07 /numpy/distutils/fcompiler
parenta70de5c870aa9406ddd84fd98e3d32d4c006d18e (diff)
downloadnumpy-8d0b5817a3fd4f3ce465aba2fd0ddd30677b8e60.tar.gz
ENH: add support for the PathScale compilers on Linux. Closes #1043.
Thanks to R. Perez.
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/__init__.py2
-rw-r--r--numpy/distutils/fcompiler/pathf95.py36
2 files changed, 37 insertions, 1 deletions
diff --git a/numpy/distutils/fcompiler/__init__.py b/numpy/distutils/fcompiler/__init__.py
index 5c9395869..397b36ce9 100644
--- a/numpy/distutils/fcompiler/__init__.py
+++ b/numpy/distutils/fcompiler/__init__.py
@@ -694,7 +694,7 @@ _default_compilers = (
'intelvem', 'intelem')),
('cygwin.*', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')),
('linux.*', ('gnu','intel','lahey','pg','absoft','nag','vast','compaq',
- 'intele','intelem','gnu95','g95')),
+ 'intele','intelem','gnu95','g95','pathf95')),
('darwin.*', ('nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95', 'pg')),
('sunos.*', ('sun','gnu','gnu95','g95')),
('irix.*', ('mips','gnu','gnu95',)),
diff --git a/numpy/distutils/fcompiler/pathf95.py b/numpy/distutils/fcompiler/pathf95.py
new file mode 100644
index 000000000..c92653ba7
--- /dev/null
+++ b/numpy/distutils/fcompiler/pathf95.py
@@ -0,0 +1,36 @@
+from numpy.distutils.fcompiler import FCompiler
+
+compilers = ['PathScaleFCompiler']
+
+class PathScaleFCompiler(FCompiler):
+
+ compiler_type = 'pathf95'
+ description = 'PathScale Fortran Compiler'
+ version_pattern = r'PathScale\(TM\) Compiler Suite: Version (?P<version>[\d.]+)'
+
+ executables = {
+ 'version_cmd' : ["pathf95", "-version"],
+ 'compiler_f77' : ["pathf95", "-fixedform"],
+ 'compiler_fix' : ["pathf95", "-fixedform"],
+ 'compiler_f90' : ["pathf95"],
+ 'linker_so' : ["pathf95", "-shared"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+ pic_flags = ['-fPIC']
+ module_dir_switch = '-module ' # Don't remove ending space!
+ module_include_switch = '-I'
+
+ def get_flags_opt(self):
+ return ['-O3']
+ def get_flags_debug(self):
+ return ['-g']
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(2)
+ #compiler = PathScaleFCompiler()
+ from numpy.distutils.fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='pathf95')
+ compiler.customize()
+ print compiler.get_version()