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=None)
x.__init__(...) initializes x; see help(type(x)) 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. If necessary, the value is built.
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. As the value need not be built when get_contents() is called, we cannot use the actual node.built_value.
source code
 
get_contents(self)
Get contents for signature calculations. :return: bytes
source code
 
changed_since_last_build(self, target, prev_ni) source code
 
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.
source code

Inherited from Node: Decider, GetTag, Tag, 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, 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, release_target_info, 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_pseudo, set_specific_source, set_state, visited

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

Properties [hide private]

Inherited from Node: always_build, attributes, binfo, builder, cached, depends, depends_set, env, executor, ignore, ignore_set, implicit, implicit_set, includes, is_explicit, linked, ninfo, nocache, noclean, precious, prerequisites, pseudo, ref_count, side_effect, side_effects, sources, sources_set, state, store_info, waiting_parents, waiting_s_e, wkids

Inherited from object: __class__

Method Details [hide private]

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

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

__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

get_contents(self)

source code 
Get contents for signature calculations. :return: bytes
Overrides: Node.get_contents

changed_since_last_build(self, target, prev_ni)

source code 
Overrides: changed_since_last_build

get_csig(self, calc=None)

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.

Returns string. Ideally string of hex digits. (Not bytes)

Overrides: Node.get_csig