annotate tool_dependencies.xml @ 16:7719329e5b98 draft

Depend on iuc versions of libraries
author jankanis
date Wed, 28 May 2014 05:28:22 -0400
parents 5972e67030fd
children d30e6a97dfbf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
1 <?xml version="1.0"?>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
2 <tool_dependency>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
3 <package name="openssl" version="1.0.1g">
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
4 <repository changeset_revision="3b19041c651c" name="package_openssl_1_0" owner="iuc" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu" />
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
5 </package>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
6
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
7 <package name="sqlite" version="3.8.3">
7
34e257e3aceb add prior_installation_required
jankanis
parents: 6
diff changeset
8 <repository changeset_revision="706b1f3b1fc0" name="package_sqlite_3_8_3" owner="iuc" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu" />
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
9 </package>
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
10
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
11 <package name="gdbm" version="1.11">
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
12 <repository changeset_revision="ad3c23208758" name="package_gdbm_1_11" owner="iuc" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu" />
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
13 </package>
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
14
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
15
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
16 <package name="python3" version="3.4.1">
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
17 <install version="1.0">
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
18 <actions>
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
19 <action type="download_by_url">https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz</action>
9
d3ea5f1b4d79 Another attempt at getting the environment settings right.
jankanis
parents: 8
diff changeset
20
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
21 <action type="set_environment_for_install">
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
22 <repository changeset_revision="3b19041c651c" name="package_openssl_1_0" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu">
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
23 <package name="openssl" version="1.0.1g" />
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
24 </repository>
7
34e257e3aceb add prior_installation_required
jankanis
parents: 6
diff changeset
25 <repository changeset_revision="706b1f3b1fc0" name="package_sqlite_3_8_3" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu">
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
26 <package name="sqlite" version="3.8.3" />
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
27 </repository>
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
28 <repository changeset_revision="ad3c23208758" name="package_gdbm_1_11" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu">
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
29 <package name="gdbm" version="1.11" />
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
30 </repository>
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
31 </action>
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
32
9
d3ea5f1b4d79 Another attempt at getting the environment settings right.
jankanis
parents: 8
diff changeset
33 <action type="shell_command">
12
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
34 # The python build system doesn't check CPATH / C(PLUS)_INCLUDE_PATH which is set by the depended-upon
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
35 # tool definitions for these sources, but it does check CPPFLAGS / LDFLAGS
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
36 # Currently not whitespace-safe, I haven't found a way yet to quote the *FLAGS values so that they are
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
37 # correctly recognized by both the python build process and the compiler. But as galaxy itself isn't
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
38 # whitespace-safe either it doesn't really matter (currently).
12
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
39 oldifs="$IFS"
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
40 IFS=":"
12
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
41 for p in $CPLUS_INCLUDE_PATH
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
42 do
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
43 CPPFLAGS="$CPPFLAGS -I$p"
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
44 done
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
45 for p in $LD_LIBRARY_PATH
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
46 do
13
9dbfc4fcef0a Fix LDFLAGS. This version is not yet safe against paths containing whitespace.
jankanis
parents: 12
diff changeset
47 LDFLAGS="$LDFLAGS -L$p"
12
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
48 done
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
49 IFS="$oldifs"
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
50 export CPPFLAGS
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
51 export LDFLAGS
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
52
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
53 # Clear variables that may be used in Galaxy's extenal python 2 environment
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
54 unset PYTHONPATH
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
55 unset PYTHONHOME
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
56
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
57 ./configure --prefix="$INSTALL_DIR" --with-ensurepip --enable-loadable-sqlite-extensions \
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
58 &amp;&amp; make \
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
59 &amp;&amp; make install
4091cf3b81e5 Uploaded
jankanis
parents: 11
diff changeset
60 </action>
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
61
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
62 <action type="set_environment">
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
63 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
14
59b33d253163 re-export LD_LIBRARY_PATH so that the required libraries can also be found at runtime
jankanis
parents: 13
diff changeset
64 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[LD_LIBRARY_PATH]</environment_variable>
6
321cacd4ae43 Add dependencies and settings for sqlite and gdbm, so that python can build its packages for those.
jankanis
parents: 5
diff changeset
65 <!-- empty PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path -->
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
66 <environment_variable action="set_to" name="PYTHONPATH" />
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
67 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable>
4
9491d3c0dbe6 Add --with-ensurepip
jankanis
parents: 3
diff changeset
68 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable>
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
69 </action>
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
70 </actions>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
71 </install>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
72
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
73 <readme>
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
74 Python 3.4.1
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
75
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
76 The Python programming language version 3.
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
77
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
78 http://www.python.org
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
79
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
80
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
81 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.
14
59b33d253163 re-export LD_LIBRARY_PATH so that the required libraries can also be found at runtime
jankanis
parents: 13
diff changeset
82
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
83 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:
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
84
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
85 &lt;action type="set_environment_for_install"&gt;
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
86 &lt;repository name="python3" owner="jankanis"&gt;
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
87 &lt;package name="python3" version="3.4.1" /&gt;
1
09faf0ae581b Fix some whitespace
jankanis
parents: 0
diff changeset
88 &lt;/repository&gt;
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
89 &lt;!-- other install time dependencies --&gt;
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
90 &lt;/action&gt;
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
91
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
92 &lt;action type="shell_command"&gt;
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
93 # Unset any saved environment settings from parent virtual
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
94 # environments, e.g. for python 2 or if Galaxy itself is running
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
95 # from within a virtual environment.
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
96 unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
97 # Create virtual environment MY_TOOL_venv
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
98 pyvenv MY_TOOL_venv
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
99 # install python packages
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
100 MY_TOOL_venv/bin/pip3 install {{NEEDED_PYTHON_PACKAGES}}
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
101 &lt;/action&gt;
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
102
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
103 &lt;action type="set_environment"&gt;
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
104 &lt;!-- Remove any incoming PYTHONPATH elements from Galaxy's own python 2 environment,
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
105 but include an existing install time PYTHONPATH (e.g. from other python3 virtual
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
106 environments in the dependency hierarchy. --&gt;
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
107 &lt;environment_variable name="PYTHONPATH" action="set_to"&gt;$INSTALL_DIR/MY_TOOL_venv/lib/python3.4/site-packages:$ENV[PYTHONPATH]&lt;/environment_variable&gt;
15
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
108 &lt;!-- All that is really needed to use a specific virtual environment is that the
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
109 python interpreter in that environment is used, so add it to PATH --&gt;
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
110 &lt;environment_variable name="PATH" action="prepend_to"&gt;$INSTALL_DIR/MY_TOOL_venv/bin&lt;/environment_variable&gt;
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
111 &lt;!-- Clear incoming PYTHONHOME just like the venv's 'activate' command does --&gt;
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
112 &lt;environment_variable name="PYTHONHOME" action="set_to"&gt;&lt;/environment_variable&gt;
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
113 &lt;!-- To find shared libraries for python built-in modules such as libssl or libsqlite3
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
114 we need to re-export LD_LIBRARY_PATH --&gt;
5972e67030fd enable dbm module, update docs
jankanis
parents: 14
diff changeset
115 &lt;environment_variable name="LD_LIBRARY_PATH" action="prepend_to"&gt;$ENV[LD_LIBRARY_PATH]&lt;/environment_variable&gt;
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
116 &lt;/action&gt;
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
117
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
118 </readme>
16
7719329e5b98 Depend on iuc versions of libraries
jankanis
parents: 15
diff changeset
119
0
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
120 </package>
e9407b729a69 Uploaded
jankanis
parents:
diff changeset
121 </tool_dependency>