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

Class Value

source code

object --+    
         |    
      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.



Nested Classes [hide private]
  NodeInfo
The generic base class for signature information for a Node.
  BuildInfo
The generic base class for build information for a Node.

Inherited from Node: Attrs

Instance Methods [hide private]
 
__init__(self, value, built_value=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
str_for_display(self) source code
 
__str__(self)
str(x)
source code
 
make_ready(self)
Get a Node ready for evaluation.
source code
 
build(self, **kw)
Actually build the node.
source code
 
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.
source code
 
is_under(self, dir) source code
 
write(self, built_value)
Set the value of the node.
source code
 
read(self)
Return the value.
source code
 
get_text_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.
source code
 
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.
source code
 
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.
source code
 
get_csig(self, calc=False)
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.
source code

Inherited from Node: Decider, add_dependency, add_ignore, add_prerequisite, add_source, add_to_implicit, add_to_waiting_parents, add_to_waiting_s_e, add_wkid, all_children, alter_targets, builder_set, built, changed, children, children_are_up_to_date, clear, clear_memoized_values, del_binfo, disambiguate, do_not_store_info, env_set, executor_cleanup, exists, explain, for_signature, get_abspath, get_binfo, get_build_env, get_build_scanner_path, get_builder, get_cachedir_csig, get_env, get_env_scanner, get_executor, get_found_includes, get_implicit_deps, get_ninfo, get_source_scanner, get_state, get_stored_implicit, get_stored_info, get_string, get_subst_proxy, get_suffix, get_target_scanner, has_builder, has_explicit_builder, is_derived, is_literal, missing, multiple_side_effect_has_builder, new_binfo, new_ninfo, postprocess, prepare, push_to_cache, remove, render_include_tree, reset_executor, retrieve_from_cache, rexists, scan, scanner_key, select_scanner, set_always_build, set_executor, set_explicit, set_nocache, set_noclean, set_precious, set_specific_source, set_state, state_has_changed, store_info, visited

Inherited from Node (private): _add_child, _children_get, _children_reset

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]

Inherited from Node: __metaclass__, memoizer_counters

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, value, built_value=False)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: Node.__init__

__str__(self)
(Informal representation operator)

source code 
str(x)

Overrides: object.__str__
(inherited documentation)

make_ready(self)

source code 
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: Node.make_ready
(inherited documentation)

build(self, **kw)

source code 
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: Node.build
(inherited documentation)

is_up_to_date(self)

source code 
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.

Overrides: Node.is_up_to_date

read(self)

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

get_text_contents(self)

source code 
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_contents(self)

source code 
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.

changed_since_last_build(self, target, prev_ni)

source code 


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: Node.changed_since_last_build
(inherited documentation)

get_csig(self, calc=False)

source code 
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: Node.get_csig