Mercurial > repos > wolma > package_python_3_4_x_lean
comparison tool_dependencies.xml @ 0:3956f4688295 draft
Uploaded
author | wolma |
---|---|
date | Tue, 26 Apr 2016 11:03:45 -0400 |
parents | |
children | 040f60d3c15b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3956f4688295 |
---|---|
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"> | |
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"> | |
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 | |
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> | |
24 </action> | |
25 | |
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" \ | |
51 && make \ | |
52 && make install | |
53 </action> | |
54 | |
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 <!-- fix too strict compiler settings under Python 3.4 --> | |
63 <environment_variable action="prepend_to" name="CFLAGS">-Wno-error=declaration-after-statement</environment_variable> | |
64 </action> | |
65 </actions> | |
66 </install> | |
67 <readme> | |
68 The Python programming language version 3.4 | |
69 | |
70 http://www.python.org | |
71 | |
72 | |
73 A lean build of Python 3.4.x. | |
74 | |
75 This package receives bug fixes within the 3.4 release series! | |
76 | |
77 It contains the zlib and sqlite3 modules as the only stdlib modules with | |
78 external dependencies (handled in here by depending on package_zlib_1_2_8 | |
79 and package_sqlite_3_8_3). | |
80 | |
81 In particular, this build does not compile Python's ssl module (which | |
82 would cause dependency on openssl and, in turn, on Perl). | |
83 | |
84 This means that **the pip installation tool will not be available with | |
85 this build** !! | |
86 | |
87 For a full build (including the ssl module) look at | |
88 https://toolshed.g2.bx.psu.edu/view/jankanis/package_python3_4 | |
89 written by jankanis, of which this package is a shameless plagiarism. | |
90 | |
91 This version of Python includes a built-in virtual environment manager. | |
92 To create a Python 3 virtual env, include the following actions in your | |
93 tool_dependencies.xml, e.g. for a package MY_TOOL_venv: | |
94 | |
95 <action type="set_environment_for_install"> | |
96 <repository name="package_python3_zlib_dependent_1_0" owner="wolma"> | |
97 <package name="python3" version="3.4" /> | |
98 </repository> | |
99 <!-- other install time dependencies --> | |
100 </action> | |
101 | |
102 <action type="shell_command"> | |
103 | |
104 # Create virtual environment MY_TOOL_venv | |
105 # pip cannot be used for installation because it depends on ssl, | |
106 # which this build does not provide | |
107 | |
108 pyvenv --without-pip $INSTALL_DIR/MY_TOOL_venv | |
109 | |
110 # install python packages | |
111 # assuming you are in the download directory of the package | |
112 | |
113 $INSTALL_DIR/MY_TOOL_venv/bin/python3 setup.py install | |
114 </action> | |
115 | |
116 For an example of how this could used by a package look at the | |
117 tool_dependencies file of: | |
118 | |
119 https://toolshed.g2.bx.psu.edu/view/wolma/mimodd | |
120 | |
121 </readme> | |
122 </package> | |
123 </tool_dependency> |