def test_user_warning(tmpdir, recwarn): dir_recipe_path = tmpdir.mkdir("recipe-path") recipe = dir_recipe_path.join("meta.yaml") recipe.write("") main_build.parse_args([str(recipe)]) assert "RECIPE_PATH received is a file. File: {}\n" \ "It should be a path to a folder. \n" \ "Forcing conda-build to use the recipe file.".format(str(recipe))\ == str(recwarn.pop(UserWarning).message) main_build.parse_args([str(dir_recipe_path)]) assert not recwarn.list
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"], )
def main(): _, args = parse_args(sys.argv[1:]) args = args.__dict__ config = Config(**args) init_api_context() config.output_folder = os.path.abspath(config.output_folder) if not os.path.exists(config.output_folder): mkdir_p(config.output_folder) print(f"Updating build index: {(config.output_folder)}\n") update_index(config.output_folder, verbose=config.debug, threads=1) recipe = args["recipe"][0] 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"], )
def main(): _, args = parse_args(sys.argv[1:]) config = prepare(**args.__dict__) action = "test" if args.test else "build" call_conda_build(action, config)
def test_long_test_prefix(additional_args, is_long_test_prefix): args = ['non_existing_recipe'] + additional_args parser, args = main_build.parse_args(args) config = Config(**args.__dict__) assert config.long_test_prefix is is_long_test_prefix
def test_long_test_prefix(additional_args, is_long_test_prefix): args = ['non_existing_recipe'] + additional_args parser, args = main_build.parse_args(args) config = Config(**args.__dict__) assert config.long_test_prefix is is_long_test_prefix