0
|
1 <?xml version="1.0"?>
|
|
2 <tool_dependency>
|
|
3 <package name="zlib" version="1.2.8">
|
2
|
4 <repository changeset_revision="63a4a902cda2" name="package_zlib_1_2_8" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
|
1
|
5 </package>
|
|
6
|
|
7 <package name="sqlite" version="3.8.3">
|
|
8 <repository changeset_revision="706b1f3b1fc0" name="package_sqlite_3_8_3" owner="iuc" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu" />
|
|
9 </package>
|
|
10
|
|
11 <package name="python3" version="3.4.1">
|
0
|
12 <install version="1.0">
|
|
13 <actions>
|
|
14 <action type="download_by_url">https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz</action>
|
1
|
15
|
0
|
16 <action type="set_environment_for_install">
|
2
|
17 <repository changeset_revision="63a4a902cda2" name="package_zlib_1_2_8" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu">
|
0
|
18 <package name="zlib" version="1.2.8" />
|
1
|
19 </repository>
|
|
20
|
|
21 <repository changeset_revision="706b1f3b1fc0" name="package_sqlite_3_8_3" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu">
|
|
22 <package name="sqlite" version="3.8.3" />
|
|
23 </repository>
|
0
|
24 </action>
|
1
|
25
|
0
|
26 <action type="shell_command">
|
|
27 # The python build system doesn't check CPATH / C(PLUS)_INCLUDE_PATH which is set by the depended-upon
|
|
28 # tool definitions for these sources, but it does check CPPFLAGS / LDFLAGS
|
|
29 # Currently not whitespace-safe, I haven't found a way yet to quote the *FLAGS values so that they are
|
|
30 # correctly recognized by both the python build process and the compiler. But as galaxy itself isn't
|
|
31 # whitespace-safe either it doesn't really matter (currently).
|
|
32 oldifs="$IFS"
|
|
33 IFS=":"
|
|
34 for p in $CPLUS_INCLUDE_PATH
|
|
35 do
|
|
36 CPPFLAGS="$CPPFLAGS -I$p"
|
|
37 done
|
|
38 for p in $LD_LIBRARY_PATH
|
|
39 do
|
|
40 LDFLAGS="$LDFLAGS -L$p"
|
|
41 done
|
|
42 IFS="$oldifs"
|
|
43 export CPPFLAGS
|
|
44 export LDFLAGS
|
|
45
|
|
46 # Clear variables that may be used in Galaxy's extenal python 2 environment
|
|
47 unset PYTHONPATH
|
|
48 unset PYTHONHOME
|
|
49
|
|
50 ./configure --prefix="$INSTALL_DIR" --with-ensurepip \
|
|
51 && make \
|
|
52 && make install
|
1
|
53 </action>
|
|
54
|
0
|
55 <action type="set_environment">
|
|
56 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
|
|
57 <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[LD_LIBRARY_PATH]</environment_variable>
|
|
58 <!-- clear PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path. -->
|
|
59 <environment_variable action="set_to" name="PYTHONPATH" />
|
|
60 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable>
|
|
61 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable>
|
|
62 </action>
|
|
63 </actions>
|
|
64 </install>
|
|
65 <readme>
|
|
66 Python 3.4.1
|
|
67
|
|
68 The Python programming language version 3.
|
|
69
|
|
70 http://www.python.org
|
|
71
|
|
72
|
1
|
73 A lean build of python 3.4.1.
|
|
74 It contains the zlib and sqlite3 modules as the only stdlib modules with
|
|
75 external dependencies (handled in here by depending on package_zlib_1_2_8
|
|
76 and package_sqlite_3_8_3).
|
0
|
77
|
1
|
78 In particular, this build does not compile Python's ssl module (which
|
|
79 would cause dependency on openssl and, in turn, on Perl).
|
0
|
80
|
1
|
81 This means that **the pip installation tool will not be available with
|
|
82 this build** !!
|
|
83
|
|
84 For a full build (including the ssl module) look at
|
0
|
85 https://toolshed.g2.bx.psu.edu/view/jankanis/package_python3_4
|
|
86 written by jankanis, of which this package is a shameless plagiarism.
|
|
87
|
1
|
88 This version of Python includes a built-in virtual environment manager.
|
|
89 To create a Python 3 virtual env, include the following actions in your
|
|
90 tool_dependencies.xml, e.g. for a package MY_TOOL_venv:
|
0
|
91
|
|
92 <action type="set_environment_for_install">
|
|
93 <repository name="package_python3_zlib_dependent_1_0" owner="wolma">
|
|
94 <package name="python3" version="3.4.1" />
|
|
95 </repository>
|
|
96 <!-- other install time dependencies -->
|
|
97 </action>
|
|
98
|
|
99 <action type="shell_command">
|
|
100
|
|
101 # Create virtual environment MY_TOOL_venv
|
|
102 # pip cannot be used for installation because it depends on ssl,
|
|
103 # which this build does not provide
|
|
104
|
|
105 pyvenv --without-pip $INSTALL_DIR/MY_TOOL_venv
|
|
106
|
|
107 # install python packages
|
|
108 # assuming you are in the download directory of the package
|
|
109
|
|
110 $INSTALL_DIR/MY_TOOL_venv/bin/python3 setup.py install
|
|
111 </action>
|
|
112
|
1
|
113 For an example of how this could used by a package look at the
|
|
114 tool_dependencies file of:
|
0
|
115
|
1
|
116 https://toolshed.g2.bx.psu.edu/view/wolma/mimodd
|
0
|
117
|
|
118 </readme>
|
1
|
119 </package>
|
0
|
120 </tool_dependency>
|