| 31 | Extra command line arguments to pass to the fortran90 compiler. |
| 32 | """ |
| 33 | def __init__( |
| 34 | self, name, sources, |
| 35 | include_dirs=None, |
| 36 | define_macros=None, |
| 37 | undef_macros=None, |
| 38 | library_dirs=None, |
| 39 | libraries=None, |
| 40 | runtime_library_dirs=None, |
| 41 | extra_objects=None, |
| 42 | extra_compile_args=None, |
| 43 | extra_link_args=None, |
| 44 | export_symbols=None, |
| 45 | swig_opts=None, |
| 46 | depends=None, |
| 47 | language=None, |
| 48 | f2py_options=None, |
| 49 | module_dirs=None, |
| 50 | extra_c_compile_args=None, |
| 51 | extra_cxx_compile_args=None, |
| 52 | extra_f77_compile_args=None, |
| 53 | extra_f90_compile_args=None,): |
| 54 | |
| 55 | old_Extension.__init__( |
| 56 | self, name, [], |
| 57 | include_dirs=include_dirs, |
| 58 | define_macros=define_macros, |
| 59 | undef_macros=undef_macros, |
| 60 | library_dirs=library_dirs, |
| 61 | libraries=libraries, |
| 62 | runtime_library_dirs=runtime_library_dirs, |
| 63 | extra_objects=extra_objects, |
| 64 | extra_compile_args=extra_compile_args, |
| 65 | extra_link_args=extra_link_args, |
| 66 | export_symbols=export_symbols) |
| 67 | |
| 68 | # Avoid assert statements checking that sources contains strings: |
| 69 | self.sources = sources |
| 70 | |
| 71 | # Python 2.4 distutils new features |
| 72 | self.swig_opts = swig_opts or [] |
| 73 | # swig_opts is assumed to be a list. Here we handle the case where it |
| 74 | # is specified as a string instead. |
| 75 | if isinstance(self.swig_opts, str): |
| 76 | import warnings |
| 77 | msg = "swig_opts is specified as a string instead of a list" |
| 78 | warnings.warn(msg, SyntaxWarning, stacklevel=2) |
| 79 | self.swig_opts = self.swig_opts.split() |
| 80 | |
| 81 | # Python 2.3 distutils new features |
| 82 | self.depends = depends or [] |
| 83 | self.language = language |
| 84 | |
| 85 | # numpy_distutils features |
| 86 | self.f2py_options = f2py_options or [] |
| 87 | self.module_dirs = module_dirs or [] |
| 88 | self.extra_c_compile_args = extra_c_compile_args or [] |
| 89 | self.extra_cxx_compile_args = extra_cxx_compile_args or [] |
| 90 | self.extra_f77_compile_args = extra_f77_compile_args or [] |