wtools  3.2.0-pre1
ESO waf tools
wtools.project Namespace Reference

Classes

class  CheckContext
 
class  LintContext
 

Functions

def result_or_value (value, *args, **kwargs)
 
def default_configure (cnf, recurse, orig, requires, **kwargs)
 
def wtools_showversion (option, opt, value, parser)
 
def default_options (opt, recurse, orig_options, requires, **kwargs)
 
def default_init (ctx, tooldir)
 
def default_build (bld, recurse, top)
 
def check_env (self, env, predicate=None)
 
def declare_project (name, version, recurse, requires, **kwargs)
 

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 or callable invoked without arguments returning string.
  recurse: Glob-patterns of directories to recurse into or callable that returns ditto.
           Callable is invoked during option, configuration and build phases and must accept
           single context argument.
  requires: A string list of project requirements (c.f. wtools.config.Requires) or callable
            returning ditto. Callable is invoked during option and configuration phase and must
            accept single context argument.
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_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
        pytest_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,
**  kwargs 
)
Returns the default implementation of the configure command.

◆ default_init()

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

◆ default_options()

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

◆ result_or_value()

def wtools.project.result_or_value (   value,
args,
**  kwargs 
)
Return result of  `value(*args, **kwargs)` if value is callable, else `value`