idiap_devtools.conda#

Functions

get_parsed_recipe(metadata)

Renders the recipe and returns the interpreted YAML file.

get_rendered_metadata(recipe_dir, config)

Renders the recipe and returns the interpreted YAML file.

make_conda_config(options)

Creates a conda configuration for a build merging various sources.

parse_dependencies(recipe_dir, config)

rtype:

tuple[str, list[str]]

remove_pins(deps)

root_logger_protection()

Protects the root logger against spurious (conda) manipulation.

use_mambabuild()

Will inject mamba solver to conda build API to speed up resolves.

idiap_devtools.conda.root_logger_protection()[source]#

Protects the root logger against spurious (conda) manipulation.

Still to verify: conda does some operations on loggers at import, so we may need to put the import inside this context manager too.

idiap_devtools.conda.make_conda_config(options)[source]#

Creates a conda configuration for a build merging various sources.

This function will use the conda-build API to construct a configuration by merging different sources of information.

Parameters:

options (dict[str, Any]) – A dictionary (typically read from a condarc YAML file) that contains build and channel options

Return type:

Any

Returns:

A dictionary containing the merged configuration, as produced by conda-build API’s get_or_merge_config() function.

idiap_devtools.conda.use_mambabuild()[source]#

Will inject mamba solver to conda build API to speed up resolves.

idiap_devtools.conda.get_rendered_metadata(recipe_dir, config)[source]#

Renders the recipe and returns the interpreted YAML file.

idiap_devtools.conda.get_parsed_recipe(metadata)[source]#

Renders the recipe and returns the interpreted YAML file.

idiap_devtools.conda.remove_pins(deps)[source]#
idiap_devtools.conda.parse_dependencies(recipe_dir, config)[source]#
Return type:

tuple[str, list[str]]