wtools
ESO waf tools
wtools.project Namespace Reference

Classes

class  CheckContext
 
class  LintContext
 

Functions

def create_project_lmod (task)
 
def create_project_gdbinit (task)
 
def default_configure (cnf, recurse, orig, requires, wtools_dir, **kwargs)
 
def wtools_showversion (option, opt, value, parser)
 
def default_options (opt, recurse, requires, wtools_dir, **kwargs)
 
def default_init (ctx, wtools_dir)
 
def default_build (bld, recurse, top)
 
def check_env (self, env, predicate=None)
 
def declare_project (name, version, recurse, requires, **kwargs)
 

Variables

string name = ''
 
string version = ''
 
 LMOD_TEMPLATE = \
 
 GDBINIT_TEMPLATE = \
 

Detailed Description

Module that provides automatic declaration of a software project.

Function Documentation

◆ check_env()

def wtools.project.check_env (   self,
  env,
  predicate = None 
)
Check presence of environment variable env
Args:
    env:    Name of environment variable to test presence for.
    predicate: Predicate used to perform additional test(s).
               Signature (status, error) = predicate(value)
               where 'status' is False for failed test, True otherwise and
               'error' is an error description to the user.

Example:

    def configure(ctx):
        ctx.check_env('FOO')

◆ declare_project()

def wtools.project.declare_project (   name,
  version,
  recurse,
  requires,
**  kwargs 
)
Declares a top level waf project

Args:
  name: Project name
  version: Version string
  recurse: Glob-patterns of directories to recurse into.
  requires: A string list of project requirements (c.f. wtools.config.Requires).
kwargs:
  boost_libs: string list of boost libraries to include. E.g. 'program_options filesystem'
  qt5: dict for qt5 specific arguments 
       libs: string or list of Qt5 libraries to include. E.g. ['Qt5Core', 'Qt5Widgets', 'Qt5UiPlugin']
  cxx: dict for C/C++ specific arguments
        clang_tidy_header_filter # Regular expression matching the names of the headers
        clang_tidy_line_filter # JSON list of files with line ranges to filter the warnings
        clang_tidy_config # Path to clang-tidy configuration file
        c_std
        cxx_std
  java: dict for Java specific arguments
        checkstyle_config
  python: dict for Python specific arguments
        pylint_config

◆ default_build()

def wtools.project.default_build (   bld,
  recurse,
  top 
)
Default implementation of build command.

◆ default_configure()

def wtools.project.default_configure (   cnf,
  recurse,
  orig,
  requires,
  wtools_dir,
**  kwargs 
)
Returns the default implementation of the configure command.

◆ default_init()

def wtools.project.default_init (   ctx,
  wtools_dir 
)
Default implementation of init

◆ default_options()

def wtools.project.default_options (   opt,
  recurse,
  requires,
  wtools_dir,
**  kwargs 
)
Default implementation of options in the top level waf script