当前位置: 首页>>代码示例>>Python>>正文


Python BuilderBase._execute方法代码示例

本文整理汇总了Python中SCons.Builder.BuilderBase._execute方法的典型用法代码示例。如果您正苦于以下问题:Python BuilderBase._execute方法的具体用法?Python BuilderBase._execute怎么用?Python BuilderBase._execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SCons.Builder.BuilderBase的用法示例。


在下文中一共展示了BuilderBase._execute方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _execute

# 需要导入模块: from SCons.Builder import BuilderBase [as 别名]
# 或者: from SCons.Builder.BuilderBase import _execute [as 别名]
 def _execute(self, env, target, source, *args):
   if not target:
     if env.has_key('POTDOMAIN') and env['POTDOMAIN']:
       domain = env['POTDOMAIN']
     else:
       domain = 'messages'
     target = [ domain ]
   return BuilderBase._execute(self, env, target, source, *args)
开发者ID:ChineseDr,项目名称:mongo,代码行数:10,代码来源:xgettext.py

示例2: _execute

# 需要导入模块: from SCons.Builder import BuilderBase [as 别名]
# 或者: from SCons.Builder.BuilderBase import _execute [as 别名]
 def _execute(self, env, target, source, *args):
     if not target:
         if env.has_key("POTDOMAIN") and env["POTDOMAIN"]:
             domain = env["POTDOMAIN"]
         else:
             domain = "messages"
         target = [domain]
     return BuilderBase._execute(self, env, target, source, *args)
开发者ID:scopeInfinity,项目名称:swift,代码行数:10,代码来源:xgettext.py

示例3: _execute

# 需要导入模块: from SCons.Builder import BuilderBase [as 别名]
# 或者: from SCons.Builder.BuilderBase import _execute [as 别名]
    def _execute(self, env, target, source, *args, **kw):
        """ Execute builder's actions.
    
    Here we append to `target` the languages read from `$LINGUAS_FILE` and 
    apply `SCons.Builder.BuilderBase._execute()` separatelly to each target.
    The arguments and return value are same as for
    `SCons.Builder.BuilderBase._execute()`. 
    """
        import SCons.Util
        import SCons.Node

        linguas_files = None
        if env.has_key("LINGUAS_FILE") and env["LINGUAS_FILE"]:
            linguas_files = env["LINGUAS_FILE"]
            # This prevents endless recursion loop (we'll be invoked once for
            # each target appended here, we must not extend the list again).
            env["LINGUAS_FILE"] = None
            linguas = _read_linguas_from_files(env, linguas_files)
            if SCons.Util.is_List(target):
                target.extend(linguas)
            elif target is not None:
                target = [target] + linguas
            else:
                target = linguas
        if not target:
            # Let the SCons.BuilderBase to handle this patologic situation
            return BuilderBase._execute(self, env, target, source, *args, **kw)
        # The rest is ours
        if not SCons.Util.is_List(target):
            target = [target]
        result = []
        for tgt in target:
            r = BuilderBase._execute(self, env, [tgt], source, *args, **kw)
            result.extend(r)
        if linguas_files is not None:
            env["LINGUAS_FILE"] = linguas_files
        return SCons.Node.NodeList(result)
开发者ID:IljaGrebel,项目名称:OpenWrt-SDK-imx6_HummingBoard,代码行数:39,代码来源:GettextCommon.py

示例4: _execute

# 需要导入模块: from SCons.Builder import BuilderBase [as 别名]
# 或者: from SCons.Builder.BuilderBase import _execute [as 别名]
 def _execute(self, env, target, source, *args, **kw):
   # Here we add support for 'LINGUAS_FILE' keyword. Emitter is not suitable
   # in this case, as it is called too late (after multiple sources
   # are handled single_source builder.
   import SCons.Util
   from SCons.Tool.GettextCommon import _read_linguas_from_files
   linguas_files = None
   if env.has_key('LINGUAS_FILE') and env['LINGUAS_FILE'] is not None:
     linguas_files = env['LINGUAS_FILE']
     # This should prevent from endless recursion. 
     env['LINGUAS_FILE'] = None
     # We read only languages. Suffixes shall be added automatically.
     linguas = _read_linguas_from_files(env, linguas_files)
     if SCons.Util.is_List(source):
       source.extend(linguas)
     elif source is not None:
       source = [source] + linguas
     else:
       source = linguas
   result = BuilderBase._execute(self,env,target,source,*args, **kw)
   if linguas_files is not None:
     env['LINGUAS_FILE'] = linguas_files
   return result
开发者ID:18392517817,项目名称:_Linux-OS-Network_,代码行数:25,代码来源:msgfmt.py

示例5: _execute

# 需要导入模块: from SCons.Builder import BuilderBase [as 别名]
# 或者: from SCons.Builder.BuilderBase import _execute [as 别名]
 def _execute(self, env, target, source, ow={}, exec_kw={}):
     """
     Override _execute() to remove C header files from the sources list
     """
     sources = BuilderBase._execute(self, env, target,source, ow, exec_kw)
     return [x for x in sources if is_c_file(x)]
开发者ID:farcaller,项目名称:yasha,代码行数:8,代码来源:scons.py


注:本文中的SCons.Builder.BuilderBase._execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。