@@ -180,7 +180,7 @@ def docker_galaxy_config(ctx, runnables, for_tests=False, **kwds):
180180 def config_join (* args ):
181181 return os .path .join (config_directory , * args )
182182
183- _handle_dependency_resolution (config_directory , kwds )
183+ _handle_dependency_resolution (ctx , config_directory , kwds )
184184 _handle_job_metrics (config_directory , kwds )
185185
186186 shed_tool_conf = "config/shed_tool_conf.xml"
@@ -289,7 +289,7 @@ def config_join(*args):
289289 galaxy_root = config_join ("galaxy-dev" )
290290
291291 server_name = "planemo%d" % random .randint (0 , 100000 )
292- _handle_dependency_resolution (config_directory , kwds )
292+ _handle_dependency_resolution (ctx , config_directory , kwds )
293293 _handle_job_config_file (config_directory , server_name , kwds )
294294 _handle_job_metrics (config_directory , kwds )
295295 file_path = kwds .get ("file_path" ) or config_join ("files" )
@@ -1118,7 +1118,7 @@ def _handle_job_config_file(config_directory, server_name, kwds):
11181118 kwds ["job_config_file" ] = job_config_file
11191119
11201120
1121- def _handle_dependency_resolution (config_directory , kwds ):
1121+ def _handle_dependency_resolution (ctx , config_directory , kwds ):
11221122 resolutions_strategies = [
11231123 "brew_dependency_resolution" ,
11241124 "dependency_resolvers_config_file" ,
@@ -1149,16 +1149,19 @@ def _handle_dependency_resolution(config_directory, kwds):
11491149 def add_attribute (key , value ):
11501150 attributes .append ('%s="%s"' % (key , value ))
11511151
1152+ conda_prefix_specified = False
11521153 for key , default_value in iteritems (dependency_attribute_kwds ):
11531154 value = kwds .get (key , default_value )
11541155 if value != default_value :
1156+ conda_prefix_specified = value == "conda_prefix"
11551157 # Strip leading prefix (conda_) off attributes
11561158 attribute_key = "_" .join (key .split ("_" )[1 :])
11571159 add_attribute (attribute_key , value )
11581160
1159- if not [ attribute for attribute in attributes if "prefix" in attribute ]:
1160- conda_context = build_conda_context ( ** kwds )
1161+ conda_context = build_conda_context ( ctx , ** kwds )
1162+ if not conda_prefix_specified :
11611163 add_attribute ("prefix" , conda_context .conda_prefix )
1164+ add_attribute ("condarc_override" , conda_context .condarc_override )
11621165
11631166 attribute_str = " " .join (attributes )
11641167
@@ -1173,6 +1176,11 @@ def add_attribute(key, value):
11731176 'attributes' : attribute_str
11741177 })
11751178 open (resolvers_conf , "w" ).write (conf_contents )
1179+ ctx .vlog (
1180+ "Writing dependency_resolvers_config_file to path %s with contents [%s]" ,
1181+ resolvers_conf ,
1182+ conf_contents ,
1183+ )
11761184 kwds ["dependency_resolvers_config_file" ] = resolvers_conf
11771185
11781186
0 commit comments