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


Python Target.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 outs,
                 cmd,
                 blade,
                 kwargs):
        """Init method.

        Init the gen rule target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)
        outs = var_to_list(outs)

        Target.__init__(self,
                        name,
                        'gen_rule',
                        srcs,
                        deps,
                        blade,
                        kwargs)

        self.data['outs'] = outs
        self.data['cmd'] = cmd
开发者ID:HopLiu,项目名称:typhoon-blade,代码行数:29,代码来源:gen_rule_target.py

示例2: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 type,
                 srcs,
                 deps,
                 base,
                 visibility,
                 kwargs):
        """Init method. """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        type,
                        srcs,
                        deps,
                        visibility,
                        blade.blade,
                        kwargs)

        if base:
            if not base.startswith('//'):
                console.error_exit('%s: Invalid base directory %s. Option base should '
                                   'be a directory starting with \'//\' from BLADE_ROOT directory.' %
                                   (self.fullname, base))
            self.data['python_base'] = base[2:]
        self.data['python_sources'] = [self._source_file_path(s) for s in srcs]
开发者ID:project-zerus,项目名称:blade,代码行数:30,代码来源:py_targets.py

示例3: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 target_type,
                 srcs,
                 deps,
                 warning,
                 defs,
                 incs,
                 export_incs,
                 optimize,
                 extra_cppflags,
                 extra_linkflags,
                 blade,
                 kwargs):
        """Init method.

        Init the cc target.

        """
        srcs_list = var_to_list(srcs)
        srcs = []
        for item in srcs_list:
            if (';' in item):
                # file list expanded with asterisk wildcard
                file_name_array = string.split(item, ';')
                for file_name in file_name_array:
                    srcs.append(file_name)
            else:
                srcs.append(item)
        deps = var_to_list(deps)
        defs = var_to_list(defs)
        incs = var_to_list(incs)
        export_incs = var_to_list(export_incs)
        opt = var_to_list(optimize)
        extra_cppflags = var_to_list(extra_cppflags)
        extra_linkflags = var_to_list(extra_linkflags)

        Target.__init__(self,
                        name,
                        target_type,
                        srcs,
                        deps,
                        blade,
                        kwargs)

        self.data['warning'] = warning
        self.data['defs'] = defs
        # add by zxy([email protected]) 20140929 support absolute include path (/common/gsl/include)
        for index, item in enumerate(incs):
            if (item.startswith('/')):
                incs[index] = find_relative_path(self.path, item)
        #end
        self.data['incs'] = incs
        self.data['export_incs'] = export_incs
        self.data['optimize'] = opt
        self.data['extra_cppflags'] = extra_cppflags
        self.data['extra_linkflags'] = extra_linkflags

        self._check_defs()
        self._check_incorrect_no_warning()
开发者ID:huzelin,项目名称:blade,代码行数:62,代码来源:cc_targets.py

示例4: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 outs,
                 cmd,
                 blade,
                 kwargs):
        """Init method.

        Init the gen rule target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)
        outs = var_to_list(outs)

        Target.__init__(self,
                        name,
                        'gen_rule',
                        srcs,
                        deps,
                        None,
                        blade,
                        kwargs)

        self.data['outs'] = outs
        self.data['locations'] = []
        self.data['cmd'] = location_re.sub(self._process_location_reference, cmd)
开发者ID:project-zerus,项目名称:blade,代码行数:31,代码来源:gen_rule_target.py

示例5: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 prebuilt,
                 blade,
                 kwargs):
        """Init method.

        Init the java jar target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        'java_jar',
                        srcs,
                        deps,
                        blade,
                        kwargs)

        if prebuilt:
            self.type = 'prebuilt_java_jar'
            self.data['jar_class_path'] = self._prebuilt_java_jar_src_path()
        self.data['java_jars'] = []
        self.java_jar_cmd_list = []
        self.cmd_var_list = []
        self.java_jar_after_dep_source_list = []
        self.targets_dependency_map = {}
        self.java_jar_dep_vars = {}
开发者ID:AdolphLua,项目名称:Pebble,代码行数:34,代码来源:java_jar_target.py

示例6: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 type,
                 out,
                 blade,
                 kwargs):
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        'package',
                        [],
                        deps,
                        None,
                        blade,
                        kwargs)

        if type not in _package_types:
            console.error_exit('%s: Invalid type %s. Types supported '
                               'by the package are %s' % (
                               self.fullname, type, ', '.join(sorted(_package_types))))
        self.data['type'] = type
        self.data['sources'], self.data['locations'] = [], []
        self._process_srcs(srcs)

        if not out:
            out = '%s.%s' % (name, type)
        self.data['out'] = out
开发者ID:project-zerus,项目名称:blade,代码行数:33,代码来源:package_target.py

示例7: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 type,
                 srcs,
                 deps,
                 resources,
                 source_encoding,
                 warnings,
                 kwargs):
        """Init method.

        Init the java jar target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)
        resources = var_to_list(resources)

        Target.__init__(self,
                        name,
                        type,
                        srcs,
                        deps,
                        None,
                        blade.blade,
                        kwargs)
        self._process_resources(resources)
        self.data['source_encoding'] = source_encoding
        if warnings is not None:
            self.data['warnings'] = var_to_list(warnings)
开发者ID:,项目名称:,代码行数:32,代码来源:

示例8: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 prebuilt,
                 blade,
                 kwargs):
        """Init method.

        Init the java jar target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        'java_jar',
                        srcs,
                        deps,
                        blade,
                        kwargs)

        if prebuilt:
            self.data['type'] = 'prebuilt_java_jar'
        self.java_jar_cmd_list = []
        self.cmd_var_list = []
        self.java_jar_after_dep_source_list = []
        self.targets_dependency_map = {}
        self.java_jar_dep_vars = {}
        self.java_jars_map = self.blade.get_java_jars_map()
        self.sources_dependency_map = self.blade.get_sources_explict_dependency_map()
开发者ID:abael,项目名称:blade,代码行数:34,代码来源:java_jar_target.py

示例9: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
 def __init__(self, fname, *args, **kwargs):
     self.pass_filename = kwargs.get('pass_filename', False)
     if 'pass_filename' in kwargs:
         del kwargs['pass_filename']
     Target.__init__(self, *args, **kwargs)
     if self.pass_filename:
         self.passes = 1
     self.filename = fname
开发者ID:jaredly,项目名称:pbj,代码行数:10,代码来源:file.py

示例10: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 target_type,
                 srcs,
                 deps,
                 warning,
                 defs,
                 incs,
                 export_incs,
                 optimize,
                 extra_cppflags,
                 extra_linkflags,
                 install_dir,
                 extra_cmds,
                 blade,
                 kwargs):
        """Init method.

        Init the cc target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)
        defs = var_to_list(defs)
        incs = var_to_list(incs)
        export_incs = var_to_list(export_incs)
        opt = var_to_list(optimize)
        extra_cppflags = var_to_list(extra_cppflags)
        extra_linkflags = var_to_list(extra_linkflags)
        extra_cmds = var_to_list(extra_cmds)
        
        Target.__init__(self,
                        name,
                        target_type,
                        srcs,
                        deps,
                        blade,
                        kwargs)

        self.data['warning'] = warning
        self.data['defs'] = defs
        self.data['incs'] = incs
        self.data['export_incs'] = export_incs
        self.data['optimize'] = opt
        self.data['extra_cppflags'] = extra_cppflags
        self.data['extra_linkflags'] = extra_linkflags
        self.data['install_dir'] = install_dir
        self.data['extra_cmds'] = extra_cmds

        self._check_defs()
        self._check_incorrect_no_warning()
开发者ID:merlin82,项目名称:typhoon-blade,代码行数:53,代码来源:cc_targets.py

示例11: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 testdata,
                 kwargs):
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)
        testdata = var_to_list(testdata)

        Target.__init__(self,
                        name,
                        'sh_test',
                        srcs,
                        deps,
                        None,
                        blade.blade,
                        kwargs)

        self._process_test_data(testdata)
开发者ID:project-zerus,项目名称:blade,代码行数:22,代码来源:sh_test_target.py

示例12: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 srcs,
                 deps,
                 prebuilt,
                 blade,
                 kwargs):
        """Init method. """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        'py_binary',
                        srcs,
                        deps,
                        blade,
                        kwargs)

        if prebuilt:
            self.data['type'] = 'prebuilt_py_binary'
开发者ID:xujianjlu,项目名称:typhoon-blade,代码行数:23,代码来源:py_targets.py

示例13: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 type,
                 srcs,
                 deps,
                 kwargs):
        """Init the go target. """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        type,
                        srcs,
                        deps,
                        None,
                        blade.blade,
                        kwargs)

        self._set_go_package()
        self._init_go_environment()
开发者ID:project-zerus,项目名称:blade,代码行数:23,代码来源:go_targets.py

示例14: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
    def __init__(self,
                 name,
                 type,
                 srcs,
                 deps,
                 prebuilt,
                 blade,
                 kwargs):
        """Init method.

        Init the java jar target.

        """
        srcs = var_to_list(srcs)
        deps = var_to_list(deps)

        Target.__init__(self,
                        name,
                        type,
                        srcs,
                        deps,
                        blade,
                        kwargs)
开发者ID:AdolphLua,项目名称:Pebble,代码行数:25,代码来源:java_targets.py

示例15: __init__

# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import __init__ [as 别名]
 def __init__(self, name, command, shell=False, echo=True, cwd=None, **kwargs):
     Target.__init__(self, name, **kwargs)
     self.command = command
     self.cwd = cwd
     self.echo = echo
     self.shell = shell
开发者ID:pombredanne,项目名称:pbj,代码行数:8,代码来源:cmd.py


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