util

Utility functions for

  • building and importing modules on test time, using a temporary location
  • detecting if compilers are present

Module Contents

_module_dir
_cleanup()
get_module_dir()
get_temp_module_name()
_memoize(func)
build_module(source_files, options=[], skip=[], only=[], module_name=None)

Compile and import a f2py module, built from the given files.

build_code(source_code, options=[], skip=[], only=[], suffix=None, module_name=None)

Compile and import Fortran code using f2py.

_compiler_status
_get_compiler_status()
has_c_compiler()
has_f77_compiler()
has_f90_compiler()
build_module_distutils(source_files, config_code, module_name, **kw)

Build a module via distutils and import it.

class F2PyTest

Bases:object

code
sources
options = []
skip = []
only = []
suffix = .f
module
module_name
setUp(self)