diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-09-14 18:55:03 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-09-14 18:55:03 +0000 |
commit | 951cdad1a9b0a15b673bf56aecc1fef5066061f3 (patch) | |
tree | f307f0f2ebf404526fcc671958e8ea836b53baf9 /scipy_distutils/absoftfcompiler.py | |
parent | c261078e9c2d8fd958bf8b3758cdd07add5fc2e3 (diff) | |
download | numpy-951cdad1a9b0a15b673bf56aecc1fef5066061f3.tar.gz |
renamed directories
Diffstat (limited to 'scipy_distutils/absoftfcompiler.py')
-rw-r--r-- | scipy_distutils/absoftfcompiler.py | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/scipy_distutils/absoftfcompiler.py b/scipy_distutils/absoftfcompiler.py deleted file mode 100644 index 72864f127..000000000 --- a/scipy_distutils/absoftfcompiler.py +++ /dev/null @@ -1,128 +0,0 @@ - -# http://www.absoft.com/literature/osxuserguide.pdf -# http://www.absoft.com/documentation.html - -# Notes: -# - when using -g77 then use -DUNDERSCORE_G77 to compile f2py -# generated extension modules (works for f2py v2.45.241_1936 and up) - -import os -import sys - -from cpuinfo import cpu -from fcompiler import FCompiler, dummy_fortran_file -from misc_util import cyg2win32 - -class AbsoftFCompiler(FCompiler): - - compiler_type = 'absoft' - #version_pattern = r'FORTRAN 77 Compiler (?P<version>[^\s*,]*).*?Absoft Corp' - version_pattern = r'(f90:.*?Absoft Pro FORTRAN Version|FORTRAN 77 Compiler)'+\ - r' (?P<version>[^\s*,]*)(.*?Absoft Corp|)' - - # samt5735(8)$ f90 -V -c dummy.f - # f90: Copyright Absoft Corporation 1994-2002; Absoft Pro FORTRAN Version 8.0 - # Note that fink installs g77 as f77, so need to use f90 for detection. - - executables = { - 'version_cmd' : ["f90", "-V -c %(fname)s.f -o %(fname)s.o" \ - % {'fname':cyg2win32(dummy_fortran_file())}], - 'compiler_f77' : ["f77"], - 'compiler_fix' : ["f90"], - 'compiler_f90' : ["f90"], - 'linker_so' : ["f90"], - 'archiver' : ["ar", "-cr"], - 'ranlib' : ["ranlib"] - } - - if os.name=='nt': - library_switch = '/out:' #No space after /out:! - - module_dir_switch = None - module_include_switch = '-p' - - def get_flags_linker_so(self): - if os.name=='nt': - opt = ['/dll'] - else: - opt = ["-K","shared"] - return opt - - def library_dir_option(self, dir): - if os.name=='nt': - return ['-link','/PATH:"%s"' % (dir)] - return "-L" + dir - - def library_option(self, lib): - if os.name=='nt': - return '%s.lib' % (lib) - return "-l" + lib - - def get_library_dirs(self): - opt = FCompiler.get_library_dirs(self) - d = os.environ.get('ABSOFT') - if d: - opt.append(os.path.join(d,'LIB')) - return opt - - def get_libraries(self): - opt = FCompiler.get_libraries(self) - opt.extend(['fio','f90math','fmath']) - if os.name =='nt': - opt.append('COMDLG32') - return opt - - def get_flags(self): - opt = FCompiler.get_flags(self) - if os.name != 'nt': - opt.extend(['-s']) - if self.get_version(): - if self.get_version()>='8.2': - opt.append('-fpic') - return opt - - def get_flags_f77(self): - opt = FCompiler.get_flags_f77(self) - opt.extend(['-N22','-N90','-N110']) - v = self.get_version() - if os.name == 'nt': - if v and v>='8.0': - opt.extend(['-f','-N15']) - else: - opt.append('-f') - if v: - if v<='4.6': - opt.append('-B108') - else: - # Though -N15 is undocumented, it works with - # Absoft 8.0 on Linux - opt.append('-N15') - return opt - - def get_flags_f90(self): - opt = FCompiler.get_flags_f90(self) - opt.extend(["-YCFRL=1","-YCOM_NAMES=LCS","-YCOM_PFX","-YEXT_PFX", - "-YCOM_SFX=_","-YEXT_SFX=_","-YEXT_NAMES=LCS"]) - if self.get_version(): - if self.get_version()>'4.6': - opt.extend(["-YDEALLOC=ALL"]) - return opt - - def get_flags_fix(self): - opt = FCompiler.get_flags_fix(self) - opt.extend(["-YCFRL=1","-YCOM_NAMES=LCS","-YCOM_PFX","-YEXT_PFX", - "-YCOM_SFX=_","-YEXT_SFX=_","-YEXT_NAMES=LCS"]) - opt.extend(["-f","fixed"]) - return opt - - def get_flags_opt(self): - opt = ['-O'] - return opt - -if __name__ == '__main__': - from distutils import log - log.set_verbosity(2) - from fcompiler import new_fcompiler - compiler = new_fcompiler(compiler='absoft') - compiler.customize() - print compiler.get_version() |