diff options
author | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
commit | 6782a92fd1a7625ee48f6b2946a7d7149ab28a77 (patch) | |
tree | 177a92f0673655b58b247e663477af06ac1192b6 /command/config_compiler.py | |
parent | 216f071ab060a6f08c22666aea33f7095f079d1e (diff) | |
download | numpy-6782a92fd1a7625ee48f6b2946a7d7149ab28a77.tar.gz |
Branch numpy.distutils to distutils-revamp
Diffstat (limited to 'command/config_compiler.py')
-rw-r--r-- | command/config_compiler.py | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/command/config_compiler.py b/command/config_compiler.py new file mode 100644 index 000000000..8e23a3d3d --- /dev/null +++ b/command/config_compiler.py @@ -0,0 +1,65 @@ + +import sys +from distutils.core import Command + +#XXX: Implement confic_cc for enhancing C/C++ compiler options. +#XXX: Linker flags + +def show_fortran_compilers(_cache=[]): + # Using cache to prevent infinite recursion + if _cache: return + _cache.append(1) + + from numpy.distutils.fcompiler import show_fcompilers + import distutils.core + dist = distutils.core._setup_distribution + show_fcompilers(dist) + return + +class config_fc(Command): + """ Distutils command to hold user specified options + to Fortran compilers. + + config_fc command is used by the FCompiler.customize() method. + """ + + user_options = [ + ('fcompiler=',None,"specify Fortran compiler type"), + ('f77exec=', None, "specify F77 compiler command"), + ('f90exec=', None, "specify F90 compiler command"), + ('f77flags=',None,"specify F77 compiler flags"), + ('f90flags=',None,"specify F90 compiler flags"), + ('opt=',None,"specify optimization flags"), + ('arch=',None,"specify architecture specific optimization flags"), + ('debug','g',"compile with debugging information"), + ('noopt',None,"compile without optimization"), + ('noarch',None,"compile without arch-dependent optimization"), + ] + + help_options = [ + ('help-fcompiler',None, "list available Fortran compilers", + show_fortran_compilers), + ] + + boolean_options = ['debug','noopt','noarch'] + + def initialize_options(self): + self.fcompiler = None + self.f77exec = None + self.f90exec = None + self.f77flags = None + self.f90flags = None + self.opt = None + self.arch = None + self.debug = None + self.noopt = None + self.noarch = None + return + + def finalize_options(self): + # Do nothing. + return + + def run(self): + # Do nothing. + return |