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