diff venv/lib/python2.7/site-packages/planemo/galaxy_run.py @ 0:d67268158946 draft

planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
author bcclaywell
date Mon, 12 Oct 2015 17:43:33 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venv/lib/python2.7/site-packages/planemo/galaxy_run.py	Mon Oct 12 17:43:33 2015 -0400
@@ -0,0 +1,23 @@
+from planemo.io import info
+from galaxy.tools.deps.commands import shell
+
+
+# Activate galaxy's virtualenv if present (needed for tests say but not for
+# server because run.sh does this).
+ACTIVATE_COMMAND = "[ -e .venv ] && . .venv/bin/activate"
+
+# TODO: Mac-y curl variant of this.
+DOWNLOAD_GALAXY = (
+    "wget https://codeload.github.com/galaxyproject/galaxy/tar.gz/dev"
+)
+
+
+def run_galaxy_command(ctx, command, env, action, daemon=False):
+    message = "%s with command [%s]" % (action, command)
+    info(message)
+    ctx.vlog("With environment variables:")
+    ctx.vlog("============================")
+    for key, value in env.items():
+        ctx.vlog('%s="%s"' % (key, value))
+    ctx.vlog("============================")
+    return shell(command, env=env)