Package SCons :: Package Node :: Module Python :: Class Value
[show private | hide private]
[frames | no frames]

Class Value

Node --+
       |
      Value


A class for Python variables, typically passed on the command line or generated by a script, but not from a file or some other source.


Method Summary
  __init__(self, value, built_value)
  __str__(self)
  build(self, **kw)
Actually build the node.
  changed_since_last_build(self, target, prev_ni)
Must be overridden in a specific subclass to return True if this Node (a dependency) has changed since the last time it was used to build the specified target.
  get_contents(self)
By the assumption that the node.built_value is a deterministic product of the sources, the contents of a Value are the concatenation of all the contents of its sources.
  get_csig(self, calc)
Because we're a Python value node and don't have a real timestamp, we get to ignore the calculator and just use the value contents.
  is_under(self, dir)
  is_up_to_date(self)
Alternate check for whether the Node is current: If all of our children were up-to-date, then this Node was up-to-date, too.
  make_ready(self)
Get a Node ready for evaluation.
  read(self)
Return the value.
  write(self, built_value)
Set the value of the node.
    Inherited from Node
  add_dependency(self, depend)
Adds dependencies.
  add_ignore(self, depend)
Adds dependencies to ignore.
  add_prerequisite(self, prerequisite)
Adds prerequisites
  add_source(self, source)
Adds sources.
  add_to_implicit(self, deps)
  add_to_waiting_parents(self, node)
Returns the number of nodes added to our waiting parents list: 1 if we add a unique waiting parent, 0 if not.
  add_to_waiting_s_e(self, node)
  add_wkid(self, wkid)
Add a node to the list of kids waiting to be evaluated
  all_children(self, scan)
Return a list of all the node's direct children.
  alter_targets(self)
Return a list of alternate targets for this Node.
  builder_set(self, builder)
  built(self)
Called just after this node is successfully built.
  call_for_all_waiting_parents(self, func)
  changed(self, node)
Returns if the node is up-to-date with respect to the BuildInfo stored last time it was built.
  children(self, scan)
Return a list of the node's direct children, minus those that are ignored by this node.
  children_are_up_to_date(self)
Alternate check for whether the Node is current: If all of our children were up-to-date, then this Node was up-to-date, too.
  clear(self)
Completely clear a Node of all its cached state (so that it can be re-evaluated by interfaces that do continuous integration builds).
  clear_memoized_values(self)
  Decider(self, function)
  del_binfo(self)
Delete the build info from this node.
  disambiguate(self, must_exist)
  do_not_ignore(self, node)
  do_not_store_info(self)
  env_set(self, env, safe)
  executor_cleanup(self)
Let the executor clean up any cached information.
  exists(self)
Does this node exists?
  explain(self)
  for_signature(self)
Return a string representation of the Node that will always be the same for this particular Node, no matter what.
  get_abspath(self)
Return an absolute path to the Node.
  get_binfo(self)
Fetch a node's build information.
  get_build_env(self)
Fetch the appropriate Environment to build this node.
  get_build_scanner_path(self, scanner)
Fetch the appropriate scanner path for this node.
  get_builder(self, default_builder)
Return the set builder, or a specified default value
  get_cachedir_csig(self)
  get_env(self)
  get_env_scanner(self, env, kw)
  get_executor(self, create)
Fetch the action executor for this node.
  get_found_includes(self, env, scanner, path)
Return the scanned include lines (implicit dependencies) found in this node.
  get_implicit_deps(self, env, scanner, path)
Return a list of implicit dependencies for this node.
  get_ninfo(self)
  get_source_scanner(self, node)
Fetch the source scanner for the specified node
  get_state(self)
  get_stored_implicit(self)
Fetch the stored implicit dependencies
  get_stored_info(self)
  get_string(self, for_signature)
This is a convenience function designed primarily to be used in command generators (i.e., CommandGeneratorActions or Environment variables that are callable), which are called with a for_signature argument that is nonzero if the command generator is being called to generate a signature for the command line, which determines if we should rebuild or not.
  get_subst_proxy(self)
This method is expected to return an object that will function exactly like this Node, except that it implements any additional special features that we would like to be in effect for Environment variable substitution.
  get_suffix(self)
  get_target_scanner(self)
  has_builder(self)
Return whether this Node has a builder or not.
  has_explicit_builder(self)
Return whether this Node has an explicit builder
  is_derived(self)
Returns true iff this node is derived (i.e.
  is_literal(self)
Always pass the string representation of a Node to the command interpreter literally.
  missing(self)
  multiple_side_effect_has_builder(self)
Return whether this Node has a builder or not.
  new_binfo(self)
  new_ninfo(self)
  postprocess(self)
Clean up anything we don't need to hang onto after we've been built.
  prepare(self)
Prepare for this Node to be built.
  remove(self)
Remove this Node: no-op by default.
  render_include_tree(self)
Return a text representation, suitable for displaying to the user, of the include tree for the sources of this node.
  reset_executor(self)
Remove cached executor; forces recompute when needed.
  retrieve_from_cache(self)
Try to retrieve the node's content from a cache
  rexists(self)
Does this node exist locally or in a repositiory?
  scan(self)
Scan this node's dependents for implicit dependencies.
  scanner_key(self)
  select_scanner(self, scanner)
Selects a scanner for this Node.
  set_always_build(self, always_build)
Set the Node's always_build value.
  set_executor(self, executor)
Set the action executor for this node.
  set_explicit(self, is_explicit)
  set_nocache(self, nocache)
Set the Node's nocache value.
  set_noclean(self, noclean)
Set the Node's noclean value.
  set_precious(self, precious)
Set the Node's precious value.
  set_state(self, state)
  state_has_changed(self, target, prev_ni)
  store_info(self)
Make the build signature permanent (that is, store it in the .sconsign file or equivalent).
  visited(self)
Called just after this node has been visited (with or without a build).

Class Variable Summary
classobj BuildInfo = SCons.Node.Python.ValueBuildInfo
classobj NodeInfo = SCons.Node.Python.ValueNodeInfo
    Inherited from Node
list memoizer_counters = [<SCons.Memoize.CountValue instance ...

Method Details

build(self, **kw)

Actually build the node.

This is called by the Taskmaster after it's decided that the Node is out-of-date and must be rebuilt, and after the prepare() method has gotten everything, uh, prepared.

This method is called from multiple threads in a parallel build, so only do thread safe stuff here. Do thread unsafe stuff in built().

Overrides:
SCons.Node.Node.build (inherited documentation)

changed_since_last_build(self, target, prev_ni)

Must be overridden in a specific subclass to return True if this Node (a dependency) has changed since the last time it was used to build the specified target. prev_ni is this Node's state (for example, its file timestamp, length, maybe content signature) as of the last time the target was built.

Note that this method is called through the dependency, not the target, because a dependency Node must be able to use its own logic to decide if it changed. For example, File Nodes need to obey if we're configured to use timestamps, but Python Value Nodes never use timestamps and always use the content. If this method were called through the target, then each Node's implementation of this method would have to have more complicated logic to handle all the different Node types on which it might depend.

Overrides:
SCons.Node.Node.changed_since_last_build (inherited documentation)

get_contents(self)

By the assumption that the node.built_value is a deterministic product of the sources, the contents of a Value are the concatenation of all the contents of its sources. As the value need not be built when get_contents() is called, we cannot use the actual node.built_value.

get_csig(self, calc=None)

Because we're a Python value node and don't have a real timestamp, we get to ignore the calculator and just use the value contents.

Overrides:
SCons.Node.Node.get_csig

is_up_to_date(self)

Alternate check for whether the Node is current: If all of our children were up-to-date, then this Node was up-to-date, too.

The SCons.Node.Alias and SCons.Node.Python.Value subclasses rebind their current() method to this method.

make_ready(self)

Get a Node ready for evaluation.

This is called before the Taskmaster decides if the Node is up-to-date or not. Overriding this method allows for a Node subclass to be disambiguated if necessary, or for an implicit source builder to be attached.

Overrides:
SCons.Node.Node.make_ready (inherited documentation)

read(self)

Return the value. If necessary, the value is built.

write(self, built_value)

Set the value of the node.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:32 2007 http://epydoc.sf.net