diff --git a/planemo/conda.py b/planemo/conda.py index f21e8210b..956a7bbfc 100644 --- a/planemo/conda.py +++ b/planemo/conda.py @@ -25,6 +25,7 @@ CondaContext, CondaTarget, ) +from galaxy.tool_util.deps.mulled.mulled_build import target_str_to_targets from galaxy.util import unicodify from planemo.exit_codes import ( @@ -112,21 +113,6 @@ def collect_conda_targets(ctx, paths, recursive=False, found_tool_callback=None) return conda_targets -# Copied and modified from mulled stuff - need to syncronize these concepts. -def target_str_to_targets(targets_raw: str) -> List[CondaTarget]: - def parse_target(target_str: str) -> CondaTarget: - if "=" in target_str: - package_name, version = target_str.split("=", 1) - else: - package_name = target_str - version = None - target = CondaTarget(package_name, version) - return target - - targets = [parse_target(_) for _ in targets_raw.split(",")] - return targets - - def collect_conda_target_lists( ctx: "PlanemoCliContext", paths: Iterable[str], recursive: bool = False, found_tool_callback=None ) -> List[FrozenSet[CondaTarget]]: