Skip to content

Commit 41b2bc8

Browse files
committed
Pass platform, use linux-64 when building biocontainers
1 parent 4b9d930 commit 41b2bc8

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

planemo/commands/cmd_container_register.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
DEFAULT_MESSAGE = "Add container $hash.\n**Hash**: $hash\n\n**Packages**:\n$packages\nBase Image:$base_image\n\n"
3131
DEFAULT_MESSAGE += "**For** :\n$tools\n\nGenerated with Planemo."
3232
CONTENTS = "#targets\tbase_image\timage_build\n$targets\t$base_image\t$image_build\n"
33+
BIOCONTAINERS_PLATFORM = 'linux-64'
3334

3435

3536
@click.command('container_register')
@@ -86,7 +87,7 @@ def cli(ctx, paths, **kwds):
8687
mulled_targets_str = "- " + "\n- ".join(map(conda_build_target_str, mulled_targets))
8788
best_practice_requirements = True
8889
for conda_target in conda_targets:
89-
best_hit, exact = best_practice_search(conda_target, conda_context=conda_context)
90+
best_hit, exact = best_practice_search(conda_target, conda_context=conda_context, platform=BIOCONTAINERS_PLATFORM)
9091
if not best_hit:
9192
ctx.log("Target [%s] is not available in best practice channels - skipping" % conda_target)
9293
best_practice_requirements = False

planemo/conda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def tool_source_conda_targets(tool_source):
140140
best_practice_search_first = threading.local()
141141

142142

143-
def best_practice_search(conda_target, conda_context=None):
143+
def best_practice_search(conda_target, conda_context=None, platform=None):
144144
# Call it in offline mode after the first time.
145145
try:
146146
best_practice_search_first.previously_called
@@ -152,7 +152,7 @@ def best_practice_search(conda_target, conda_context=None):
152152

153153
if not conda_context:
154154
conda_context = conda_util.CondaContext()
155-
return conda_util.best_search_result(conda_target, conda_context=conda_context, channels_override=BEST_PRACTICE_CHANNELS, offline=offline)
155+
return conda_util.best_search_result(conda_target, conda_context=conda_context, channels_override=BEST_PRACTICE_CHANNELS, offline=offline, platform=platform)
156156

157157

158158
__all__ = (

0 commit comments

Comments
 (0)