wtools 4.0.0-pre7
ESO waf tools
Loading...
Searching...
No Matches
wtools.project Namespace Reference

Classes

class  CheckContext
 
class  LintContext
 

Functions

 wtools_load (self, tool_list, *k, **kw)
 
 default_configure (cnf, recurse, orig, requires, **kwargs)
 
 default_options (opt, recurse, orig_options, requires, **kwargs)
 
 default_init (ctx, tooldir)
 
 default_build (bld, recurse, top)
 
 check_env (self, env, predicate=None)
 
 declare_project (name, version, recurse, requires, **kwargs)
 

Variables

list wtools_tooldir = []
 
 env
 

Detailed Description

Module that provides automatic declaration of a software project.

Function Documentation

◆ check_env()

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()

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:
  tools: optional string list of waf tools to load. Shorthand for loading via
      cnf.wtools_load().
  boost: dict for boost specific arguments
      libs: list of boost libraries to include. E.g. [ "program_options", "filesystem"]
      force_static: should Boost be linked statically (True) or dynamically (False). Default: False
  qt: dict for Qt specific arguments or callable, that receives as parameter the configuration
      context, that has to return a dict containing:
        version:   integer, major version of Qt version to use (supported 5 or 6)
        libs: string or list of Qt 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
  intversion: optional bool

◆ default_build()

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

◆ default_configure()

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

◆ default_init()

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

◆ default_options()

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

◆ wtools_load()

wtools.project.wtools_load ( self,
tool_list,
* k,
** kw )
Load using paths from wtools_tooldir populated in declare_project