changeset 15:824d21b5c773 draft

Uploaded
author fubar
date Thu, 20 Mar 2014 06:09:56 -0400
parents 43ab59672f78
children e052aadae3e9
files rgToolFactory.py
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rgToolFactory.py	Thu Mar 20 06:04:42 2014 -0400
+++ b/rgToolFactory.py	Thu Mar 20 06:09:56 2014 -0400
@@ -90,7 +90,8 @@
 debug = False
 toolFactoryURL = 'https://bitbucket.org/fubar/galaxytoolfactory'
 
-# if we do html we need these dependencies
+# if we do html we need these dependencies specified in a tool_dependencies.xml file and referred to in the generated
+# tool xml
 toolhtmldepskel = """<?xml version="1.0"?>
 <tool_dependency>
     <package name="ghostscript" version="9.10">
@@ -105,6 +106,11 @@
 </tool_dependency>
 """
 
+protorequirements = """<requirements>
+      <requirement type="package" version="9.10">ghostscript</requirement>
+      <requirement type="package" version="1.3.18">graphicsmagick</requirement>
+  </requirements>"""
+
 def timenow():
     """return current time as a string
     """
@@ -233,6 +239,7 @@
         """ 
         newXML="""<tool id="%(toolid)s" name="%(toolname)s" version="%(tool_version)s">
             %(tooldesc)s
+            %(requirements)s
             %(command)s
             <inputs>
             %(inputs)s
@@ -275,6 +282,9 @@
         <output name="html_file" file="%(test1HTML)s" ftype="html" lines_diff="10"/>
         </test></tests>"""
         xdict = {}
+        xdict['requirements'] = ''
+        if self.opts.make_HTML:
+            xdict['requirements'] = protorequirements
         xdict['tool_version'] = self.opts.tool_version
         xdict['test1Input'] = self.test1Input
         xdict['test1HTML'] = self.test1HTML