# HG changeset patch # User jankanis # Date 1401269302 14400 # Node ID 7719329e5b98e0b1ad4fc8869e2037feabfff4a0 # Parent 5972e67030fd8dd95081977a46757e2cd3d33134 Depend on iuc versions of libraries diff -r 5972e67030fd -r 7719329e5b98 tool_dependencies.xml --- a/tool_dependencies.xml Tue May 27 10:21:10 2014 -0400 +++ b/tool_dependencies.xml Wed May 28 05:28:22 2014 -0400 @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@ - + @@ -19,13 +19,13 @@ https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz - + - + @@ -34,10 +34,10 @@ # The python build system doesn't check CPATH / C(PLUS)_INCLUDE_PATH which is set by the depended-upon # tool definitions for these sources, but it does check CPPFLAGS / LDFLAGS # Currently not whitespace-safe, I haven't found a way yet to quote the *FLAGS values so that they are - # correctly recognized by the python build process and the compiler. But as galaxy itself isn't + # correctly recognized by both the python build process and the compiler. But as galaxy itself isn't # whitespace-safe either it doesn't really matter (currently). oldifs="$IFS" - IFS=: + IFS=":" for p in $CPLUS_INCLUDE_PATH do CPPFLAGS="$CPPFLAGS -I$p" @@ -73,7 +73,12 @@ Python 3.4.1 - This build of python is configured with --enable-loadable-sqlite-extensions and a --prefix, any other settings are default. This build does not include modules for lzma and Tkinter, but does include ssl, (g)dbm and sqlite. Adding the missing modules should not be very difficult but requires wrapping the external sources that these modules require inside galaxy. + The Python programming language version 3. + + http://www.python.org + + + This build of python is configured with --enable-loadable-sqlite-extensions, any other settings are default. This build does not include modules for lzma and Tkinter, but does include ssl, (g)dbm and sqlite. Adding the missing modules should not be very difficult but requires wrapping the external sources that these modules require inside galaxy. Python as of version 3.3 includes a built-in virtual environment manager. To create a python 3 virtual env, include the following actions in your tool_dependencies.xml: @@ -89,18 +94,17 @@ # environments, e.g. for python 2 or if Galaxy itself is running # from within a virtual environment. unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME + # Create virtual environment MY_TOOL_venv pyvenv MY_TOOL_venv + # install python packages MY_TOOL_venv/bin/pip3 install {{NEEDED_PYTHON_PACKAGES}} </action> <action type="set_environment"> - <!-- Remove any incoming PYTHONPATH elements from Galaxy's own python 2 environment. - If you want to chain multiple virtual environments so that packages installed - in all of them are visible, you need to arrange for PYTHONPATH to include the - site-packages directories of all of them, so in that case just a plain 'set_to' - would not be sufficient. - --> - <environment_variable name="PYTHONPATH" action="set_to">$INSTALL_DIR/MY_TOOL_venv/lib/python3.4/site-packages</environment_variable> + <!-- Remove any incoming PYTHONPATH elements from Galaxy's own python 2 environment, + but include an existing install time PYTHONPATH (e.g. from other python3 virtual + environments in the dependency hierarchy. --> + <environment_variable name="PYTHONPATH" action="set_to">$INSTALL_DIR/MY_TOOL_venv/lib/python3.4/site-packages:$ENV[PYTHONPATH]</environment_variable> <!-- All that is really needed to use a specific virtual environment is that the python interpreter in that environment is used, so add it to PATH --> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/MY_TOOL_venv/bin</environment_variable> @@ -112,6 +116,6 @@ </action> - +