ReplacingCaller

class sconstool.util.ReplacingCaller(wrapped, replacements={}, **kw)[source]

Base class for ReplacingBuilder, ReplacingAction and other similar wrappers.

Parameters:
__call__(env, *args, **kw)[source]

Invokes wrapped with args and replaced variables in env and kw.

Parameters:
  • env – SCons environment, an env.Override(...) will be passed to wrapped instead of env,
  • args – arguments to be passed to wrapped,
  • kw – keyword args (may be used to override variables in env).
apply_replacements(env, **kw)[source]

Applies replacements to env and kw.

inject_replacements(env, setter='__setitem__', only_present=False)[source]

Same as replacements.inject(self,env,setter,only_present).

replacements = None

An instance of Replacements used to replace variables.

sort_call_args(*args)[source]

May be be overwritten in a subclass to reorganize positional arguments passed to wrapped.

wrapped = None

Wrapped callable that will be invoked with replaced variables.