diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-03-10 13:49:35 +0100 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-03-10 13:49:35 +0100 |
commit | 0de5191eaec0321118254673e8f8414228668818 (patch) | |
tree | fa5fb737b2a453248fed63f1fcec5a9ff125fea3 /engine/SCons/Builder.py | |
parent | 7764805dd1d4df1cf1bdfe2ad1f2e130d91f515a (diff) |
Imported Upstream version 1.2.0.d20100306upstream/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 |