| Home | Trees | Index | Help |
|
|---|
| Package SCons :: Package Node :: Module FS :: Class Base |
|
Node --+
|
Base
Dir,
Entry,
FileA generic class for file system entries. This class is for when we don't know yet whether the entry being looked up is a file or a directory. Instances of this class can morph into either Dir or File objects by a later, more precise lookup.
Note: this class does not define __cmp__ and __hash__ for efficiency reasons. SCons does a lot of comparing of Node.FS.{Base,Entry,File,Dir} objects, so those operations must be as fast as possible, which means we want to use Python's built-in object identity comparisons.
| Method Summary | |
|---|---|
Initialize a generic Node.FS.Base object. | |
A Node.FS.Base object's string representation is its path name. | |
Does this node exists? | |
Return a string representation of the Node that will always be the same for this particular Node, no matter what. | |
Get the absolute path of the file. | |
get_dir(self)
| |
Return path relative to the current working directory of the Node.FS.Base object that owns us. | |
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)
| |
getmtime(self)
| |
getsize(self)
| |
is_under(self,
dir)
| |
isdir(self)
| |
isfile(self)
| |
islink(self)
| |
This node, which already existed, is being looked up as the specified klass. | |
Search for a list of directories in the Repository list. | |
rentry(self)
| |
Does this node exist locally or in a repositiory? | |
rfile(self)
| |
Return all of the directories for a given path list, including corresponding "backing" directories in any repositories. | |
A Node.FS.Base object's string representation is its path name. | |
set_local(self)
| |
Set the source code builder for this node. | |
Fetch the source code builder for this node. | |
If this node is in a build path, return the node corresponding to its source file. | |
stat(self)
| |
Generates a target entry that corresponds to this entry (usually a source file) with the specified prefix and suffix. | |
| Inherited from Node | |
Adds dependencies. | |
Adds dependencies to ignore. | |
Adds prerequisites | |
Adds sources. | |
| |
Returns the number of nodes added to our waiting parents list: 1 if we add a unique waiting parent, 0 if not. | |
| |
Add a node to the list of kids waiting to be evaluated | |
Return a list of all the node's direct children. | |
Return a list of alternate targets for this Node. | |
Actually build the node. | |
| |
Called just after this node is successfully built. | |
| |
Returns if the node is up-to-date with respect to the BuildInfo stored last time it was built. | |
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. | |
Return a list of the node's direct children, minus those that are ignored by this node. | |
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. | |
Completely clear a Node of all its cached state (so that it can be re-evaluated by interfaces that do continuous integration builds). | |
| |
| |
Delete the build info from this node. | |
| |
| |
| |
| |
Let the executor clean up any cached information. | |
| |
Fetch a node's build information. | |
Fetch the appropriate Environment to build this node. | |
Fetch the appropriate scanner path for this node. | |
Return the set builder, or a specified default value | |
| |
| |
| |
| |
Fetch the action executor for this node. | |
Return the scanned include lines (implicit dependencies) found in this node. | |
Return a list of implicit dependencies for this node. | |
| |
Fetch the source scanner for the specified node | |
| |
Fetch the stored implicit dependencies | |
| |
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. | |
| |
Return whether this Node has a builder or not. | |
Return whether this Node has an explicit builder | |
Returns true iff this node is derived (i.e. | |
Always pass the string representation of a Node to the command interpreter literally. | |
Default check for whether the Node is current: unknown Node subtypes are always out of date, so they will always get built. | |
Get a Node ready for evaluation. | |
| |
Return whether this Node has a builder or not. | |
| |
| |
Clean up anything we don't need to hang onto after we've been built. | |
Prepare for this Node to be built. | |
Remove this Node: no-op by default. | |
Return a text representation, suitable for displaying to the user, of the include tree for the sources of this node. | |
Remove cached executor; forces recompute when needed. | |
Try to retrieve the node's content from a cache | |
Scan this node's dependents for implicit dependencies. | |
| |
Selects a scanner for this Node. | |
Set the Node's always_build value. | |
Set the action executor for this node. | |
| |
Set the Node's nocache value. | |
Set the Node's noclean value. | |
Set the Node's precious value. | |
| |
| |
Make the build signature permanent (that is, store it in the .sconsign file or equivalent). | |
Called just after this node has been visited (with or without a build). | |
| Class Variable Summary | |
|---|---|
list |
memoizer_counters = [<SCons.Memoize.CountValue instance ...
|
| Method Details |
|---|
__init__(self,
name,
directory,
fs)
|
__str__(self)
|
exists(self)Does this node exists?
|
for_signature(self)Return a string representation of the Node that will always be the same for this particular Node, no matter what. This is by contrast to the __str__() method, which might, for instance, return a relative path for a file Node. The purpose of this method is to generate a value to be used in signature calculation for the command line used to build a target, and we use this method instead of str() to avoid unnecessary rebuilds. This method does not need to return something that would actually work in a command line; it can return any kind of nonsense, so long as it does not change.
|
get_abspath(self)Get the absolute path of the file.
|
get_path(self, dir=None)Return path relative to the current working directory of the Node.FS.Base object that owns us. |
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. The principle use is that some Nodes would like to implement a __getattr__() method, but putting that in the Node type itself has a tendency to kill performance. We instead put it in a proxy and return it from this method. It is legal for this method to return self if no new functionality is needed for Environment substitution.
|
must_be_same(self, klass)This node, which already existed, is being looked up as the specified klass. Raise an exception if it isn't. |
RDirs(self, pathlist)Search for a list of directories in the Repository list. |
rexists(self)Does this node exist locally or in a repositiory?
|
Rfindalldirs(self, pathlist)Return all of the directories for a given path list, including corresponding "backing" directories in any repositories. The Node lookups are relative to this Node (typically a directory), so memoizing result saves cycles from looking up the same path for each target in a given directory. |
rstr(self)A Node.FS.Base object's string representation is its path name. |
set_src_builder(self, builder)Set the source code builder for this node. |
src_builder(self)Fetch the source code builder for this node. If there isn't one, we cache the source code builder specified for the directory (which in turn will cache the value from its parent directory, and so on up to the file system root). |
srcnode(self)If this node is in a build path, return the node corresponding to its source file. Otherwise, return ourself. |
target_from_source(self, prefix, suffix, splitext=<function splitext at 0xa0c938>)Generates a target entry that corresponds to this entry (usually a source file) with the specified prefix and suffix. Note that this method can be overridden dynamically for generated files that need different behavior. See Tool/swig.py for an example. |
| Class Variable Details |
|---|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed Dec 12 09:39:32 2007 | http://epydoc.sf.net |