Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/planemo/commands/cmd_brew.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
author | bcclaywell |
---|---|
date | Mon, 12 Oct 2015 17:43:33 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d67268158946 |
---|---|
1 import click | |
2 | |
3 from planemo.cli import pass_context | |
4 from planemo import options | |
5 | |
6 from galaxy.tools.loader_directory import load_tool_elements_from_path | |
7 | |
8 from galaxy.tools.deps.requirements import parse_requirements_from_xml | |
9 from galaxy.tools.deps import brew_exts | |
10 from galaxy.tools.deps import brew_util | |
11 from galaxy.util import bunch | |
12 | |
13 | |
14 @click.command('brew') | |
15 @options.optional_tools_arg() | |
16 @options.brew_option() | |
17 @pass_context | |
18 def cli(ctx, path, brew=None): | |
19 """Install tool requirements using brew. (**Experimental**) | |
20 | |
21 An experimental approach to versioning brew recipes will be used. | |
22 See full discussion on the homebrew-science issues page here - | |
23 https://github.com/Homebrew/homebrew-science/issues/1191. Information | |
24 on the implementation can be found at | |
25 https://github.com/jmchilton/platform-brew | |
26 until a more permanent project home is setup. | |
27 """ | |
28 for (tool_path, tool_xml) in load_tool_elements_from_path(path): | |
29 ctx.log('Brewing requirements from tool %s', | |
30 click.format_filename(tool_path)) | |
31 mock_args = bunch.Bunch(brew=brew) | |
32 brew_context = brew_exts.BrewContext(mock_args) | |
33 requirements, containers = parse_requirements_from_xml(tool_xml) | |
34 | |
35 for recipe_context in brew_util.requirements_to_recipe_contexts( | |
36 requirements, | |
37 brew_context | |
38 ): | |
39 brew_exts.versioned_install(recipe_context) |