Hello all,

While trying to install the Glimmer3 wrapper from the Tool Shed
I noticed some very wrong looking paths, including this warning
at the terminal where run.sh was open,

Warning: local() encountered an error (return code 1) while executing
'echo 
'PYTHONPATH=$PYTHONPATH:/opt/galaxy-dist/"../galaxy-dist-shed-tools"/biopython/1.61/biopython/package_biopython_1_61/5d0c54f7fea2/lib/python;
export PYTHONPATH' >
'/opt/galaxy-dist/"../galaxy-dist-shed-tools"/biopython/1.61/bgruening/glimmer3/ab12adaa5cc2/env.sh';chmod
+x 
'/opt/galaxy-dist/"../galaxy-dist-shed-tools"/biopython/1.61/bgruening/glimmer3/ab12adaa5cc2/env.sh''

>From my configuration file,

$ grep tool_dependency_dir universe_wsgi.ini
tool_dependency_dir = "../galaxy-dist-shed-tools"

Installation of the dependencies failed. I removed the quotes in the
tool_dependency_dir setting, restarted Galaxy, uninstalled Glimmer3
and the Biopython dependency, and then re-installed Glimmer3.

This time the paths in the terminal looked sensible, although there was
still a warning:

Warning: local() encountered an error (return code 255) while
executing 'export
PYTHONPATH=$PYTHONPATH:/opt/galaxy-dist-shed-tools/biopython/1.61/biopython/package_biopython_1_61/5d0c54f7fea2/lib/python
&&

I think that is related to the currently broken dependency issue I
mentioned here:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2013-August/015971.html

I would expect Galaxy to strip the quotes (after all, they are commonly
used to escape filenames with spaces). Perhaps it is but doing so
inconsistently? It appears Python's path checking is a bit odd here:

$ python
Python 2.7.2 (default, Aug  6 2013, 16:54:30)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> p = '../galaxy-dist-shed-tools'
>>> q = '"../galaxy-dist-shed-tools"'
>>> os.path.isfile(p)
False
>>> os.path.isfile(q)
False
>>> os.path.join(os.path.curdir, p)
'./../galaxy-dist-shed-tools'
>>> os.path.join(os.path.curdir, q)
'./"../galaxy-dist-shed-tools"'
>>> os.path.isdir(os.path.join(os.path.curdir, p))
True
>>> os.path.isdir(os.path.join(os.path.curdir, q))
True
>>> os.path.abspath(p)
'/opt/galaxy-dist-shed-tools'
>>> os.path.abspath(q)
'/opt/galaxy-dist/"../galaxy-dist-shed-tools"'
>>> os.path.isdir(os.path.abspath(p))
True
>>> os.path.isdir(os.path.abspath(q))
True
>>> quit()

This feels like a bug in the Python os module to me?

Anyway, a quick hack to fix this would be to strip the quotes
when loading file or path names from the configuration file -
or abort with a clear error telling the user to remove them?

Peter
___________________________________________________________
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