comparison tool_dependencies.xml @ 5:83407422ec16 draft default tip

Uploaded
author wolma
date Sat, 11 Jun 2016 19:07:41 -0400
parents 5e5653b689ca
children
comparison
equal deleted inserted replaced
4:5e5653b689ca 5:83407422ec16
57 <action type="set_environment"> 57 <action type="set_environment">
58 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> 58 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
59 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[ZLIB_ROOT_PATH]/lib</environment_variable> 59 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[ZLIB_ROOT_PATH]/lib</environment_variable>
60 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[SQLITE_ROOT_DIR]/lib</environment_variable> 60 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[SQLITE_ROOT_DIR]/lib</environment_variable>
61 <!-- clear PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path. --> 61 <!-- clear PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path. -->
62 <environment_variable action="set_to" name="PYTHONPATH" /> 62 <environment_variable action="set_to" name="PYTHONPATH">$INSTALL_DIR</environment_variable>
63 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable> 63 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable>
64 <environment_variable action="set_to" name="PYTHONNOUSERSITE">True</environment_variable>
65 <environment_variable action="set_to" name="SITE_PACKAGES_RELPATH">lib/python3.4/site-packages</environment_variable>
64 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable> 66 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable>
65 </action> 67 </action>
66 </actions> 68 </actions>
67 </install> 69 </install>
68 70
84 would cause dependency on openssl and, in turn, on Perl). 86 would cause dependency on openssl and, in turn, on Perl).
85 87
86 This means that **the pip installation tool will not be available with 88 This means that **the pip installation tool will not be available with
87 this build** !! 89 this build** !!
88 90
89 For a full build (including the ssl module) look at 91
90 https://toolshed.g2.bx.psu.edu/view/iuc/package_python_3_4/
91 issued by the IUC.
92
93 This version of Python includes a built-in virtual environment manager. 92 This version of Python includes a built-in virtual environment manager.
94 To create a Python 3 virtual env, include the following actions in your 93 To create a Python 3 virtual env, include the following actions in your
95 tool_dependencies.xml, e.g. for a package MY_TOOL_venv: 94 tool_dependencies.xml, e.g. for a package MY_TOOL_venv:
96 95
97 &lt;action type="set_environment_for_install"&gt; 96 &lt;action type="set_environment_for_install"&gt;
99 &lt;package name="python3" version="3.4" /&gt; 98 &lt;package name="python3" version="3.4" /&gt;
100 &lt;/repository&gt; 99 &lt;/repository&gt;
101 &lt;!-- other install time dependencies --&gt; 100 &lt;!-- other install time dependencies --&gt;
102 &lt;/action&gt; 101 &lt;/action&gt;
103 102
104 &lt;action type="shell_command"&gt; 103 &lt;action type="shell_command"&gt;
105
106 # Create virtual environment MY_TOOL_venv 104 # Create virtual environment MY_TOOL_venv
107 # pip cannot be used for installation because it depends on ssl, 105 # pip cannot be used for installation because it depends on ssl,
108 # which this build does not provide 106 # which this build does not provide
109 107
110 python3 -m venv --without-pip $INSTALL_DIR/MY_TOOL_venv 108 python3 -m venv --without-pip $INSTALL_DIR/MY_TOOL_venv
115 # assuming you are in the download directory of the package 113 # assuming you are in the download directory of the package
116 114
117 $INSTALL_DIR/MY_TOOL_venv/bin/python3 setup.py install 115 $INSTALL_DIR/MY_TOOL_venv/bin/python3 setup.py install
118 &lt;/action&gt; 116 &lt;/action&gt;
119 117
120 For a full example look at the tool_dependencies file of: 118 &lt;action type="set_environment"&gt;
119 &lt;!-- prepend the bin directory of the virtual environment to PATH --&gt;
120 &lt;environment_variable name="PATH" action="prepend_to"&gt;$INSTALL_DIR/MY_TOOL_venv/bin&lt;/environment_variable&gt;
121 &lt;!-- prepend the site-packages directory of the virtual environment
122 to PYTHONPATH; using SITE_PACKAGES_RELPATH here makes it easy to migrate to
123 a different version of Python --&gt;
124 &lt;environment_variable name="PYTHONPATH" action="prepend_to"&gt;$INSTALL_DIR/MY_TOOL_venv/$SITE_PACKAGES_RELPATH&lt;/environment_variable&gt;
125 &lt;/action&gt;
126
127 Then, in your MY_TOOL.xml add the following requirements (in that order):
128
129 &lt;requirements&gt;
130 &lt;requirement name="package" version="3.4"&gt;python3&lt;/requirement&gt;
131 &lt;requirement name="package" version="XXX"&gt;MY_TOOL&lt;/requirement&gt;
132 &lt;/requirements&gt;
133
134 For a concrete example look at the tool_dependencies file of:
121 135
122 https://toolshed.g2.bx.psu.edu/view/wolma/mimodd 136 https://toolshed.g2.bx.psu.edu/view/wolma/mimodd
123 137
124 </readme> 138 </readme>
125 </package> 139 </package>