annotate tool_dependencies.xml @ 0:1c337560fa56 draft

Imported from capsule None
author wolma
date Sat, 13 Dec 2014 17:19:12 -0500
parents
children c322db44259d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
1 <?xml version="1.0"?>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
2 <tool_dependency>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
3 <package name="zlib" version="1.2.8">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
4 <repository changeset_revision="dce22a65bac2" name="package_zlib_1_2_8" owner="wolma" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
5 </package>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
6 <package name="python3" version="3.4.1">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
7 <install version="1.0">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
8 <actions>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
9 <action type="download_by_url">https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz</action>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
10 <action type="set_environment_for_install">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
11 <repository changeset_revision="dce22a65bac2" name="package_zlib_1_2_8" owner="wolma" toolshed="https://toolshed.g2.bx.psu.edu">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
12 <package name="zlib" version="1.2.8" />
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
13 </repository>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
14 </action>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
15 <action type="shell_command">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
16 # The python build system doesn't check CPATH / C(PLUS)_INCLUDE_PATH which is set by the depended-upon
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
17 # tool definitions for these sources, but it does check CPPFLAGS / LDFLAGS
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
18 # Currently not whitespace-safe, I haven't found a way yet to quote the *FLAGS values so that they are
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
19 # correctly recognized by both the python build process and the compiler. But as galaxy itself isn't
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
20 # whitespace-safe either it doesn't really matter (currently).
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
21 oldifs="$IFS"
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
22 IFS=":"
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
23 for p in $CPLUS_INCLUDE_PATH
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
24 do
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
25 CPPFLAGS="$CPPFLAGS -I$p"
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
26 done
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
27 for p in $LD_LIBRARY_PATH
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
28 do
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
29 LDFLAGS="$LDFLAGS -L$p"
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
30 done
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
31 IFS="$oldifs"
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
32 export CPPFLAGS
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
33 export LDFLAGS
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
34
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
35 # Clear variables that may be used in Galaxy's extenal python 2 environment
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
36 unset PYTHONPATH
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
37 unset PYTHONHOME
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
38
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
39 ./configure --prefix="$INSTALL_DIR" --with-ensurepip \
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
40 &amp;&amp; make \
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
41 &amp;&amp; make install
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
42 </action>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
43 <action type="set_environment">
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
44 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
45 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[LD_LIBRARY_PATH]</environment_variable>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
46 <!-- clear PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path. -->
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
47 <environment_variable action="set_to" name="PYTHONPATH" />
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
48 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
49 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
50 </action>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
51 </actions>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
52 </install>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
53 <readme>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
54 Python 3.4.1
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
55
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
56 The Python programming language version 3.
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
57
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
58 http://www.python.org
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
59
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
60
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
61 A lean build of python 3.4.1. It does not include modules with external dependencies except for the zlib module (handled in here by depending on package_zlib_1_2_8).
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
62
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
63 In particular, this build does not compile Python's ssl module, which would cause dependency on openssl and, in turn, on Perl. This means that **the pip installation tool will not be available with this build**.
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
64
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
65 For a build with more modules (and also ssl) included look at
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
66 https://toolshed.g2.bx.psu.edu/view/jankanis/package_python3_4
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
67 written by jankanis, of which this package is a shameless plagiarism.
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
68
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
69 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, e.g. for a package MY_TOOL_venv:
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
70
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
71 &lt;action type="set_environment_for_install"&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
72 &lt;repository name="package_python3_zlib_dependent_1_0" owner="wolma"&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
73 &lt;package name="python3" version="3.4.1" /&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
74 &lt;/repository&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
75 &lt;!-- other install time dependencies --&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
76 &lt;/action&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
77
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
78 &lt;action type="shell_command"&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
79
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
80 # Create virtual environment MY_TOOL_venv
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
81 # pip cannot be used for installation because it depends on ssl,
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
82 # which this build does not provide
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
83
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
84 pyvenv --without-pip $INSTALL_DIR/MY_TOOL_venv
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
85
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
86 # install python packages
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
87 # assuming you are in the download directory of the package
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
88
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
89 $INSTALL_DIR/MY_TOOL_venv/bin/python3 setup.py install
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
90 &lt;/action&gt;
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
91
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
92 For an example of how this could used by a package look at:
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
93
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
94 https://testtoolshed.g2.bx.psu.edu/view/wolma/package_mimodd_0_1_5
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
95
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
96 </readme>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
97 </package>
1c337560fa56 Imported from capsule None
wolma
parents:
diff changeset
98 </tool_dependency>