示例#1
0
    def _run_configure(self,
                       bentos,
                       bscripts=None,
                       configure_argv=None,
                       build_argv=None):
        from bento.backends.waf_backend import make_stream_logger
        from bento.backends.waf_backend import WafBackend

        top_node = self.top_node

        bento_info = bentos["bento.info"]
        package = PackageDescription.from_string(bento_info)
        package_options = PackageOptions.from_string(bento_info)

        create_fake_package_from_bento_info(top_node, bento_info)
        top_node.make_node("bento.info").safe_write(bento_info)

        global_context = create_global_context(package, package_options,
                                               WafBackend())
        conf, configure = prepare_command(global_context, "configure",
                                          configure_argv, package, top_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", build_argv,
                                     package, top_node)
        bld.waf_context.logger = make_stream_logger("build", cStringIO())
        return conf, configure, bld, build
示例#2
0
    def _execute_build(self, bento_info):
        create_fake_package_from_bento_info(self.top_node, bento_info)
        # FIXME: this should be done automatically in create_fake_package_from_bento_info
        self.top_node.make_node("bento.info").safe_write(bento_info)

        package = PackageDescription.from_string(bento_info)
        package_options = PackageOptions.from_string(bento_info)

        global_context = create_global_context(package, package_options, YakuBackend())
        conf, configure = prepare_command(global_context, "configure", [], package, self.run_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", [], package, self.run_node)
        run_command_in_context(bld, build)

        return bld
示例#3
0
    def _execute_build(self, bento_info):
        create_fake_package_from_bento_info(self.top_node, bento_info)
        # FIXME: this should be done automatically in create_fake_package_from_bento_info
        self.top_node.make_node("bento.info").safe_write(bento_info)

        package = PackageDescription.from_string(bento_info)
        package_options = PackageOptions.from_string(bento_info)

        global_context = create_global_context(package, package_options, YakuBackend())
        conf, configure = prepare_command(global_context, "configure", [], package, self.run_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", [], package, self.run_node)
        run_command_in_context(bld, build)

        return bld
示例#4
0
    def test_simple_waf(self):
        from bento.backends.waf_backend import make_stream_logger
        from bento.backends.waf_backend import WafBackend

        top_node = self.top_node

        package = PackageDescription.from_string(BENTO_INFO_WITH_EXT)
        package_options = PackageOptions.from_string(BENTO_INFO_WITH_EXT)

        create_fake_package_from_bento_info(top_node, BENTO_INFO_WITH_EXT)
        top_node.make_node("bento.info").safe_write(BENTO_INFO_WITH_EXT)

        global_context = create_global_context(package, package_options, WafBackend())
        conf, configure = prepare_command(global_context, "configure", [], package, top_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", [], package, top_node)
        bld.waf_context.logger = make_stream_logger("build", cStringIO())
        run_command_in_context(bld, build)
示例#5
0
    def test_simple_waf(self):
        from bento.backends.waf_backend import make_stream_logger
        from bento.backends.waf_backend import WafBackend

        top_node = self.top_node

        package = PackageDescription.from_string(BENTO_INFO_WITH_EXT)
        package_options = PackageOptions.from_string(BENTO_INFO_WITH_EXT)

        create_fake_package_from_bento_info(top_node, BENTO_INFO_WITH_EXT)
        top_node.make_node("bento.info").safe_write(BENTO_INFO_WITH_EXT)

        global_context = create_global_context(package, package_options, WafBackend())
        conf, configure = prepare_command(global_context, "configure", [], package, top_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", [], package, top_node)
        bld.waf_context.logger = make_stream_logger("build", cStringIO())
        run_command_in_context(bld, build)
示例#6
0
    def _run_configure(self, bentos, bscripts=None, configure_argv=None, build_argv=None):
        from bento.backends.waf_backend import make_stream_logger
        from bento.backends.waf_backend import WafBackend

        top_node = self.top_node

        bento_info = bentos["bento.info"]
        package = PackageDescription.from_string(bento_info)
        package_options = PackageOptions.from_string(bento_info)

        create_fake_package_from_bento_info(top_node, bento_info)
        top_node.make_node("bento.info").safe_write(bento_info)

        global_context = create_global_context(package, package_options, WafBackend())
        conf, configure = prepare_command(global_context, "configure",
                configure_argv, package, top_node)
        run_command_in_context(conf, configure)

        bld, build = prepare_command(global_context, "build", build_argv, package, top_node)
        bld.waf_context.logger = make_stream_logger("build", cStringIO())
        return conf, configure, bld, build