Esempio n. 1
0
def build(recipe_dir="./conda-recipe", channel=CHANNEL_DIR_DEFAULT):
    """Packages an IDS project into a conda package and then adds it to the main IDS conda channel."""
    if not os.path.exists(recipe_dir):
        print("ERROR: Recipe DOES NOT exist at:\n   %s", recipe_dir)
        raise FileNotFoundError
    else:
        print(f"Releasing from:\n   {recipe_dir}")

    if check(recipe_dir):
        output_files = get_output_file_paths(recipe_dir)
        print(f"Releasing the following packages:\n   {output_files}")
    else:
        print("Error: Checks Failed")
        raise Exception
    conda_build(recipe_dir)

    for file_path in output_files:
        if not os.path.exists(file_path):
            print("Error: Did not release %s", file_path)
        else:
            shutil.copy(file_path, os.path.join(channel, "linux-64"))
            update_index(channel)
            print(f"Updated the conda channel at:\n   {channel}")
Esempio n. 2
0
def check_action(recipe, config):
    return api.check(recipe, config=config)
Esempio n. 3
0
def test_check_recipe():
    """Technically not inspect, but close enough to belong here"""
    assert api.check(os.path.join(metadata_dir, "source_git_jinja2"))
Esempio n. 4
0
def check_action(metadata, config):
    return api.check(metadata.path, config=config)
Esempio n. 5
0
def test_check_recipe():
    """Technically not inspect, but close enough to belong here"""
    assert api.check(os.path.join(metadata_dir, "source_git_jinja2"))
Esempio n. 6
0
def test_check_multiple_sources():
    recipe = os.path.join(metadata_dir, 'multiple_sources')
    assert api.check(recipe)
Esempio n. 7
0
def check_action(recipe, config):
    return api.check(recipe, config=config)
Esempio n. 8
0
def check_action(metadata, config):
    return api.check(metadata.path, config=config)