summaryrefslogtreecommitdiff
path: root/scipy/distutils/fcompiler/hpux.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-14 22:28:28 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-14 22:28:28 +0000
commit61b48697e440f76b2337c790ec5ca763cd55200b (patch)
treeda64ece2ba0b6b97deb51c36ca320c64102e9baa /scipy/distutils/fcompiler/hpux.py
parent575d373479c63a42bc4a729a058da31a74e75d3e (diff)
downloadnumpy-61b48697e440f76b2337c790ec5ca763cd55200b.tar.gz
Moving things to live under scipy
Diffstat (limited to 'scipy/distutils/fcompiler/hpux.py')
-rw-r--r--scipy/distutils/fcompiler/hpux.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/scipy/distutils/fcompiler/hpux.py b/scipy/distutils/fcompiler/hpux.py
new file mode 100644
index 000000000..95f326cea
--- /dev/null
+++ b/scipy/distutils/fcompiler/hpux.py
@@ -0,0 +1,41 @@
+import os
+import sys
+
+from scipy.distutils.cpuinfo import cpu
+from scipy.distutils.fcompiler import FCompiler
+
+class HPUXFCompiler(FCompiler):
+
+ compiler_type = 'hpux'
+ version_pattern = r'HP F90 (?P<version>[^\s*,]*)'
+
+ executables = {
+ 'version_cmd' : ["f90", "+version"],
+ 'compiler_f77' : ["f90"],
+ 'compiler_fix' : ["f90"],
+ 'compiler_f90' : ["f90"],
+ 'linker_so' : None,
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+ module_dir_switch = None #XXX: fix me
+ module_include_switch = None #XXX: fix me
+ pic_flags = ['+pic=long']
+ def get_flags(self):
+ return self.pic_flags + ['+ppu']
+ def get_flags_opt(self):
+ return ['-O3']
+ def get_libraries(self):
+ return ['m']
+ def get_version(self, force=0, ok_status=[256,0]):
+ # XXX status==256 may indicate 'unrecognized option' or
+ # 'no input file'. So, version_cmd needs more work.
+ return FCompiler.get_version(self,force,ok_status)
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(10)
+ from scipy.distutils.fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='hpux')
+ compiler.customize()
+ print compiler.get_version()