|
14 | 14 | import click |
15 | 15 |
|
16 | 16 | from planemo import galaxy_run |
| 17 | +from planemo.conda import build_conda_context |
17 | 18 | from planemo.io import warn |
18 | 19 | from planemo.io import shell |
19 | 20 | from planemo.io import shell_join |
@@ -210,6 +211,7 @@ def config_join(*args): |
210 | 211 | log_level="${log_level}", |
211 | 212 | debug="${debug}", |
212 | 213 | watch_tools="auto", |
| 214 | + default_job_shell="/bin/bash", # For conda dependency resolution |
213 | 215 | tool_data_table_config_path=tool_data_table, |
214 | 216 | integrated_tool_panel_config=("${temp_directory}/" |
215 | 217 | "integrated_tool_panel_conf.xml"), |
@@ -679,14 +681,21 @@ def _handle_dependency_resolution(config_directory, kwds): |
679 | 681 | 'conda_auto_install': False, |
680 | 682 | 'conda_ensure_channels': '', |
681 | 683 | } |
682 | | - |
683 | 684 | attributes = [] |
| 685 | + |
| 686 | + def add_attribute(key, value): |
| 687 | + attributes.append('%s="%s"' % (key, value)) |
| 688 | + |
684 | 689 | for key, default_value in iteritems(dependency_attribute_kwds): |
685 | 690 | value = kwds.get(key, default_value) |
686 | 691 | if value != default_value: |
687 | 692 | # Strip leading prefix (conda_) off attributes |
688 | 693 | attribute_key = "_".join(key.split("_")[1:]) |
689 | | - attributes.append('%s="%s"' % (attribute_key, value)) |
| 694 | + add_attribute(attribute_key, value) |
| 695 | + |
| 696 | + if "prefix" not in attributes: |
| 697 | + conda_context = build_conda_context(**kwds) |
| 698 | + add_attribute("prefix", conda_context.conda_prefix) |
690 | 699 |
|
691 | 700 | attribute_str = " ".join(attributes) |
692 | 701 |
|
|
0 commit comments