build

Package Builder

Functions

build(recipe[, pkg_paths, testonly, …])

Build a single recipe for a single env

build_recipes(recipe_folder, config_path, …)

Build one or many bioconda packages.

conda_build_purge()

Calls conda build purge and optionally conda clean

get_subdags(dag, testonly)

has_conda_in_build(recipe)

Checks if recipe has conda or conda build in deps

remove_cycles(dag, name2recipes, failed, …)

Classes

BuildResult(success, mulled_images)

Result tuple for builds comprising success status and list of docker images

Documentation

class bioconda_utils.build.BuildResult(success, mulled_images)

Bases: tuple

Result tuple for builds comprising success status and list of docker images

property mulled_images

Alias for field number 1

property success

Alias for field number 0

bioconda_utils.build.build(recipe, pkg_paths=None, testonly=False, mulled_test=True, channels=None, docker_builder=None, raise_error=False, linter=None)[source]

Build a single recipe for a single env

Parameters
  • recipe (str) – Path to recipe

  • pkg_paths (Optional[List[str]]) – List of paths to expected packages

  • testonly (bool) – Only run the tests described in the meta.yaml

  • mulled_test (bool) – Run tests in minimal docker container

  • channels (Optional[List[str]]) – Channels to include via the --channel argument to conda-build. Higher priority channels should come first.

  • docker_builder (Optional[RecipeBuilder]) – docker_utils.RecipeBuilder object Use this docker builder to build the recipe, copying over the built recipe to the host’s conda-bld directory.

  • raise_error (bool) – Instead of returning a failed build result, raise the error instead. Used for testing.

  • linter – Linter to use for checking recipes

Return type

BuildResult

bioconda_utils.build.build_recipes(recipe_folder, config_path, recipes, mulled_test=True, testonly=False, force=False, docker_builder=None, label=None, anaconda_upload=False, mulled_upload_target=None, check_channels=None, do_lint=None, lint_exclude=None)[source]

Build one or many bioconda packages.

Parameters
  • recipe_folder (str) – Directory containing possibly many, and possibly nested, recipes.

  • config_path (str) – Path to config file

  • packages – Glob indicating which packages should be considered. Note that packages matching the glob will still be filtered out by any blacklists specified in the config.

  • mulled_test (bool) – If true, test the package in a minimal container.

  • testonly (bool) – If true, only run test.

  • force (bool) – If true, build the recipe even though it would otherwise be filtered out.

  • docker_builder (Optional[RecipeBuilder]) – If specified, use to build all recipes

  • label (Optional[str]) – If specified, use to label uploaded packages on anaconda. Default is “main” label.

  • anaconda_upload (bool) – If true, upload the package(s) to anaconda.org.

  • mulled_upload_target – If specified, upload the mulled docker image to the given target on quay.io.

  • check_channels (Optional[List[str]]) – Channels to check to see if packages already exist in them. Fefaults to every channel in the config file except “defaults”.

  • do_lint (Optional[bool]) – Whether to run linter

  • lint_exclude (Optional[List[str]]) – List of linting functions to exclude.

bioconda_utils.build.conda_build_purge()[source]

Calls conda build purge and optionally conda clean

conda clean --all is called if we haveless than 300 MB free space on the current disk.

Return type

None

bioconda_utils.build.has_conda_in_build(recipe)[source]

Checks if recipe has conda or conda build in deps