All,

I've been seeing some examples of tool_depedencies.xml come across of
the list, and I'm wondering if there are ways that it can be
simplified. When we were first defining these features, we talked
about having high level recipes for certain types of installs. This
could greatly simplify things. For example, can this:

<tool_dependency>
    <package name="requests" version="1.2.3">
        <install version="1.0">
            <actions>
                <action
type="download_by_url">http://pypi.python.org/packages/source/r/requests/re
quests-1.2.3.tar.gz</action>
                <action
type="make_directory">$INSTALL_DIR/lib/python</action>
                <action type="shell_command">export
PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python &amp;&amp;
                python setup.py install --home $INSTALL_DIR
--install-scripts $INSTALL_DIR/bin</action>
                <action type="set_environment">
                    <environment_variable name="PYTHONPATH"
action="append_to">$INSTALL_DIR/lib/python</environment_variable>
                    <environment_variable name="PATH"
action="prepend_to">$INSTALL_DIR/bin</environment_variable>
                </action>

            </actions>
        </install>
        <readme>
        </readme>
    </package>
</tool_dependency>

Be simplified to:

<tool_dependency>
    <package name="requests" version="1.2.3">
        <install recipe="python_package_setuptools"

url="http://pypi.python.org/packages/source/r/requests/requests-1.2.3.tar.gz";
/>
</tool_dependency>

The assumptions are: when version is not provided, it is 1.0 (we've
always maintained compatibility in the past for config files so
hopefully this never changes), when installing a python package the
install directories and environment variables that need to be set are
always the same.

Similar recipes could be:

autoconf: default to configure; make; make install, allow providing
configuration options
make_install: just make; make install; allow providing make options
python_virtualenv
ruby_rbenv
r_package
...

Basically, most of the times the steps to install a particular package
are boilerplate, this would remove a ton of duplication in the recipe
files. Also, a likely less popular proposal would be to go one step
further, tool_dependencies.yaml:

recipe: python_package_setuptools
name: requests
version: 1.2.3
url: 
http://pypi.python.org/packages/source/r/requests/requests-${version}.tar.gz

-- jt
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to