Mercurial > repos > wolma > package_python_3_4_x_lean
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 <action type="set_environment_for_install"> | 96 <action type="set_environment_for_install"> |
99 <package name="python3" version="3.4" /> | 98 <package name="python3" version="3.4" /> |
100 </repository> | 99 </repository> |
101 <!-- other install time dependencies --> | 100 <!-- other install time dependencies --> |
102 </action> | 101 </action> |
103 | 102 |
104 <action type="shell_command"> | 103 <action type="shell_command"> |
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 </action> | 116 </action> |
119 | 117 |
120 For a full example look at the tool_dependencies file of: | 118 <action type="set_environment"> |
119 <!-- prepend the bin directory of the virtual environment to PATH --> | |
120 <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/MY_TOOL_venv/bin</environment_variable> | |
121 <!-- 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 --> | |
124 <environment_variable name="PYTHONPATH" action="prepend_to">$INSTALL_DIR/MY_TOOL_venv/$SITE_PACKAGES_RELPATH</environment_variable> | |
125 </action> | |
126 | |
127 Then, in your MY_TOOL.xml add the following requirements (in that order): | |
128 | |
129 <requirements> | |
130 <requirement name="package" version="3.4">python3</requirement> | |
131 <requirement name="package" version="XXX">MY_TOOL</requirement> | |
132 </requirements> | |
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> |