Exemplo n.º 1
0
def main():
    _, args = parse_args(sys.argv[1:])
    args = args.__dict__

    config = Config(**args)
    channel_urls = get_rc_urls() + get_channel_urls({})

    init_api_context()

    print(f"Updating build index: {(config.output_folder)}\n")
    update_index(config.output_folder, verbose=config.debug, threads=1)

    recipe = args["recipe"][0]

    global solver
    solver = MambaSolver(channel_urls, context.subdir)
    solver.replace_channels()
    cbc, _ = conda_build.variants.get_package_combined_spec(recipe,
                                                            config=config)

    if args["test"]:
        api.test(recipe, config=config)
    else:
        api.build(
            recipe,
            post=args["post"],
            build_only=args["build_only"],
            notest=args["notest"],
            config=config,
            variants=args["variants"],
        )
Exemplo n.º 2
0
def main():
    recipe_dir = sys.argv[1]
    config = get_or_merge_config(None, {})
    config.channel_urls = get_rc_urls() + get_channel_urls({})
    config = conda_build.config.get_or_merge_config(None)

    # setting the repodata timeout to very high for conda
    context.local_repodata_ttl = 100000

    global solver
    solver = MambaSolver(config.channel_urls, context.subdir)
    solver.replace_channels()
    cbc, _ = conda_build.variants.get_package_combined_spec(recipe_dir,
                                                            config=config)

    api.build(recipe_dir)