Exemplo n.º 1
0
            def _build(extension):
                outputs = builder(self.yaku_context, extension)
                nodes = [self.build_node.make_node(o) for o in outputs]

                p = self.build_node.find_node(nodes[0].parent.bldpath())
                relative_name = extension.name.rsplit(".")[-1]
                full_name = translate_name(relative_name, p, self.build_node)

                from_node = p
                pkg_dir = op.dirname(full_name.replace(".", op.sep))
                target_dir = op.join("$sitedir", pkg_dir)
                self.outputs_registry.register_outputs(category, full_name, nodes, from_node, target_dir)
Exemplo n.º 2
0
            def _build(extension, include_dirs=None):
                env = {}
                if include_dirs:
                    env["include_dirs"] = include_dirs

                outputs = builder(self.yaku_context, extension, env=env)
                nodes = [self.build_node.make_node(o) for o in outputs]

                p = self.build_node.find_node(nodes[0].parent.bldpath())
                relative_name = extension.name.rsplit(".")[-1]
                full_name = translate_name(relative_name, p, self.build_node)

                from_node = p
                pkg_dir = op.dirname(full_name.replace('.', op.sep))
                target_dir = op.join('$sitedir', pkg_dir)
                self.outputs_registry.register_outputs(category, full_name, nodes,
                                                       from_node, target_dir)
Exemplo n.º 3
0
            def _build(extension, include_dirs=None, **kw):
                env = kw.get("env", {})
                if include_dirs:
                    env["include_dirs"] = include_dirs

                outputs = builder(self.yaku_context, extension, env=env)
                nodes = [self.build_node.make_node(o) for o in outputs]

                p = self.build_node.find_node(nodes[0].parent.bldpath())
                relative_name = extension.name.rsplit(".")[-1]
                full_name = translate_name(relative_name, p, self.build_node)

                from_node = p
                pkg_dir = op.dirname(full_name.replace('.', op.sep))
                target_dir = op.join('$sitedir', pkg_dir)
                self.outputs_registry.register_outputs(category, full_name,
                                                       nodes, from_node,
                                                       target_dir)
Exemplo n.º 4
0
def apply_register_outputs(self):
    for x in self.features:
        if x == "cprogram" and "cxx" in self.features:
            x = "cxxprogram"
        if x == "cshlib" and "cxx" in self.features:
            x = "cxxshlib"

        if x in waflib.Task.classes:
            if issubclass(waflib.Task.classes[x], waflib.Tools.ccroot.link_task):
                link = x
                break
    else:
        return

    if "pyext" in self.features and "cshlib" in self.features:
        category = "extensions"
    else:
        category = "compiled_libraries"
    bento_context = self.bld.bento_context
    ref_node = bento_context.top_node.make_node(self.path.path_from(self.path.ctx.srcnode))
    name = translate_name(self.name, ref_node, bento_context.top_node)
    self.bld.register_outputs(category, name, self.link_task.outputs)