For the record, I'd noticed that the change of working directory following a download_by_url disappears if you include any other action tags before you run setup.py Reordering fixes this so arguably it's not really a bug although it took me some time and headscratching to realise that was the problem - we should make it clear that you need to work on the archive contents as the action immediately following a download_by_url On Thu, Aug 22, 2013 at 11:31 AM, Curt Palm <cpalm@ingenuity.com> wrote:
Hi Dave,
I made changes giving the suggestions of Ross, I got a different error and that gave me insight as to what was going on. I uploaded new xml:
<?xml version="1.0"?> <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 && 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>
And this worked for me. I'm thinking you may have downloaded after I made the changes.
-Curt
On 8/21/13 6:01 PM, "Dave Bouvier" <dave@bx.psu.edu> wrote:
Curt,
I tried installing the ingtest repository on a local instance of Galaxy, and the requests python module installed without errors. Which revision of Galaxy are you trying to install this repository into, and what kind of environment are you running on that system?
--Dave B.
Try moving the <action type="download_by_url"> http://pypi.python.org/packages/source/r/requests/re quests-1.2.3.tar.gz</action>
line so it's the one before <action type="shell_command">python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin</action>
I think I've been bitten by this - it seems download_by_url changes the current path but only temporarily so you need to run setup.py immediately as the next step? If this works, please confirm to the entire list - I'm sending this to you just in case I'm full of it :)
On Thu, Aug 22, 2013 at 9:12 AM, Curt Palm <cpalm@ingenuity.com> wrote:
I've just created a repository in the sandbox and have been trying to test the installation of a dependency my tool needs. The tool needs the python module "requests" and I've written code. I get an error: STDERR python: can't open file 'setup.py': [Errno 2] No such file or directory
I've modeled my code on examples I've found in the tool shed. I've replaced the requests module with other python modules and these are installed ok. I can also download and manually install requests with "python setup.py install"
Any suggestions as to what I may be doing wrong?
-- Ross Lazarus MBBS MPH; Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444 http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ
On 2013-08-21 19:12, Curt Palm wrote:
I've just created a repository in the sandbox and have been trying to test the installation of a dependency my tool needs. The tool needs the python module "requests" and I've written code. I get an error: STDERR python: can't open file 'setup.py': [Errno 2] No such file or directory
I've modeled my code on examples I've found in the tool shed. I've replaced the requests module with other python modules and these are installed ok. I can also download and manually install requests with "python setup.py install"
Any suggestions as to what I may be doing wrong?
tool_dependencies.xml:
<?xml version="1.0"?> <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/
requests-1.2.3.tar.gz</action> <action type="make_directory">$INSTALL_DIR/lib/python</action> <action type="make_directory">$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> <action type="shell_command">python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin</action> </actions> </install> <readme> </readme> </package> </tool_dependency>
ingTest.xml:
<tool id="ingTest" name="ingTest" version="1.0"> <description>Testing Tool Shed</description> <requirements> <requirement type="package" version="1.2.3">requests</requirement> </requirements>
<command interpreter="python">
</command>
<inputs>
</inputs> <outputs>
</outputs> <help>
.. class:: infomark
</help> </tool>
Thanks,
-Curt Curt Palm Data Engineer ________________________________________ INGENUITY SYSTEMS | www.ingenuity.com 1700 Seaport Blvd., 3rd Floor | Redwood City, CA 94063 650.381.5084
___________________________________________________________ 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/
___________________________________________________________ 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/
-- Ross Lazarus MBBS MPH; Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444 http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ