diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-03-10 13:49:40 +0100 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-03-10 13:49:40 +0100 |
commit | eff7b513913aa21f41c6e304dcf5178f8bffa980 (patch) | |
tree | d991f365c5fb334ecc08f245aa008943930b83b9 /engine/SCons/Builder.py | |
parent | 5652ab4cab956f8426b1bc8d6dd0cc4ecf39f51d (diff) | |
parent | 0de5191eaec0321118254673e8f8414228668818 (diff) |
Merge commit 'upstream/1.2.0.d20100306'
Diffstat (limited to 'engine/SCons/Builder.py')
-rw-r--r-- | engine/SCons/Builder.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/SCons/Builder.py b/engine/SCons/Builder.py index fb41ae4..bf35b1e 100644 --- a/engine/SCons/Builder.py +++ b/engine/SCons/Builder.py @@ -98,7 +98,7 @@ There are the following methods for internal use within this module: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Builder.py 4629 2010/01/17 22:23:21 scons" +__revision__ = "src/engine/SCons/Builder.py 4691 2010/03/06 16:22:36 bdbaddog" import UserDict import UserList @@ -861,6 +861,16 @@ class CompositeBuilder(SCons.Util.Proxy): self.cmdgen.add_action(suffix, action) self.set_src_suffix(self.cmdgen.src_suffixes()) +def is_a_Builder(obj): + """"Returns True iff the specified obj is one of our Builder classes. + + The test is complicated a bit by the fact that CompositeBuilder + is a proxy, not a subclass of BuilderBase. + """ + return (isinstance(obj, BuilderBase) + or isinstance(obj, CompositeBuilder) + or callable(obj)) + # Local Variables: # tab-width:4 # indent-tabs-mode:nil |