Ok, here is the tool_dependencies.xml. This
<https://gist.github.com/JanKanis/650c88001c03ac4320fe#file-not_working_tool_dependencies>
(also attached, if that survives the list) is what I would like my
tool_dependencies.xml to look like, but it doesn't work because the
installation of lxml fails, as it can't find the libxml2 headers. I am now
using this
<https://gist.github.com/JanKanis/42b9cace27b9693a0677#file-workaround_tool_dependencies-xml>
as a workaround. It works because lxml is installed from a shell_command
which does include the variables set from the set_environment_for_install
block. This is from the blast2html tool.

Jan


On 24 June 2014 15:30, Dave Bouvier <d...@bx.psu.edu> wrote:

> Jan,
>
> In order to help track down this issue, could you provide the
> tool_dependencies.xml you're using?
>
>   --Dave B.
>
>
> On Tue 24 Jun 2014 05:40:30 AM EDT, Jan Kanis wrote:
>
>> In a tool_dependency.xml file I want to install python package lxml in
>> a virtual environment, as a tool I'm building needs it. The python
>> lxml package requires the libxml2 tool dependency. I have added a
>> set_environment_for_install action that refers to the libxml2
>> repository, but when python/pip tries to install lxml it fails,
>> apparently because it can't find the required headers. This appears to
>> be because the setup_virtualenv action does not include install
>> environment variables.
>>
>> It seems to me that install environment variables should be sourced
>> for every following action that can do nontrivial things, not just
>> shell commands.
>>
>> Alternatively, am I trying to install lxml the wrong way, is there a
>> better way? (I'm running on python 2.6)
>>
>> Jan
>>
>>
>> ___________________________________________________________
>> 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/
>>
>
<?xml version="1.0"?>
<tool_dependency>
  <package name="libxml2" version="2.9.1">
    <repository name="package_libxml2_2_9_1" owner="jankanis" prior_installation_required="True"
                toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="98807f0505f0" />
  </package>

  <package name="libxslt" version="1.1.28">
    <repository name="package_libxslt_1_1_28" owner="devteam" prior_installation_required="True"
                toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="039b04adcfee" />
  </package>

  <package name="zlib" version="1.2.8">
    <repository name="package_zlib_1_2_8" owner="iuc" prior_installation_required="True"
                toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="63a4a902cda2" />
  </package>

  <package name="blast2html_venv" version="0.2">
    <install version="1.0">
      <actions>
        <action type="set_environment_for_install">
          <repository name="package_libxml2_2_9_1" owner="jankanis"
                      toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="98807f0505f0">
            <package name="libxml2" version="2.9.1" />
          </repository>
          <repository name="package_libxslt_1_1_28" owner="devteam"
                      toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="039b04adcfee">
            <package name="libxslt" version="1.1.28" />
          </repository>
          <repository name="package_zlib_1_2_8" owner="iuc"
                      toolshed="http://toolshed.g2.bx.psu.edu"; changeset_revision="63a4a902cda2">
            <package name="zlib" version="1.2.8" />
          </repository>
        </action>

	<action type="setup_virtualenv">
	  jinja2==2.7.3
	  six==1.7.2
	  argparse==1.2.1
	  lxml==3.3.5
	</action>
	
        <action type="set_environment">
          <!-- add libxml2/zlib library paths so the runtime can find the shared libraries -->
          <environment_variable name="LD_LIBRARY_PATH" action="prepend_to">$ENV[LD_LIBRARY_PATH]</environment_variable>
        </action>
      </actions>
    </install>
    <readme>A Python 2 virtual environment that includes the python packages blast2html depends on, which are lxml and jinja2.</readme>
  </package>

</tool_dependency>
___________________________________________________________
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