Mercurial > repos > jankanis > package_python3_4
annotate tool_dependencies.xml @ 15:5972e67030fd draft
enable dbm module, update docs
author | jankanis |
---|---|
date | Tue, 27 May 2014 10:21:10 -0400 |
parents | 59b33d253163 |
children | 7719329e5b98 |
rev | line source |
---|---|
0 | 1 <?xml version="1.0"?> |
2 <tool_dependency> | |
3 <package name="openssl" version="1.0.1g"> | |
7 | 4 <repository changeset_revision="23ebff671a20" name="package_openssl" owner="jankanis" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu" /> |
0 | 5 </package> |
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 | 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"> |
15 | 12 <repository changeset_revision="22b9fdbed20d" name="package_gdbm_1_11" owner="jankanis" 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 | 16 <package name="python3" version="3.4.1"> |
17 <install version="1.0"> | |
18 <actions> | |
1 | 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 | 21 <action type="set_environment_for_install"> |
7 | 22 <repository changeset_revision="23ebff671a20" name="package_openssl" owner="jankanis" toolshed="http://toolshed.g2.bx.psu.edu"> |
0 | 23 <package name="openssl" version="1.0.1g" /> |
24 </repository> | |
7 | 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> |
15 | 28 <repository changeset_revision="22b9fdbed20d" name="package_gdbm_1_11" owner="jankanis" 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 | 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 | 34 # The python build system doesn't check CPATH / C(PLUS)_INCLUDE_PATH which is set by the depended-upon |
35 # tool definitions for these sources, but it does check CPPFLAGS / LDFLAGS | |
15 | 36 # Currently not whitespace-safe, I haven't found a way yet to quote the *FLAGS values so that they are |
37 # correctly recognized by the python build process and the compiler. But as galaxy itself isn't | |
38 # whitespace-safe either it doesn't really matter (currently). | |
12 | 39 oldifs="$IFS" |
40 IFS=: | |
41 for p in $CPLUS_INCLUDE_PATH | |
42 do | |
43 CPPFLAGS="$CPPFLAGS -I$p" | |
44 done | |
45 for p in $LD_LIBRARY_PATH | |
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 | 48 done |
49 IFS="$oldifs" | |
50 export CPPFLAGS | |
51 export LDFLAGS | |
52 | |
53 # Clear variables that may be used in Galaxy's extenal python 2 environment | |
54 unset PYTHONPATH | |
55 unset PYTHONHOME | |
56 | |
57 ./configure --prefix="$INSTALL_DIR" --with-ensurepip --enable-loadable-sqlite-extensions \ | |
58 && make \ | |
59 && make install | |
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 | 62 <action type="set_environment"> |
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 | 66 <environment_variable action="set_to" name="PYTHONPATH" /> |
67 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable> | |
4 | 68 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable> |
1 | 69 </action> |
0 | 70 </actions> |
71 </install> | |
72 | |
73 <readme> | |
15 | 74 Python 3.4.1 |
0 | 75 |
15 | 76 This build of python is configured with --enable-loadable-sqlite-extensions and a --prefix, 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
|
77 |
15 | 78 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 | 79 |
80 <action type="set_environment_for_install"> | |
1 | 81 <repository name="python3" owner="jankanis"> |
0 | 82 <package name="python3" version="3.4.1" /> |
1 | 83 </repository> |
15 | 84 <!-- other install time dependencies --> |
0 | 85 </action> |
15 | 86 |
0 | 87 <action type="shell_command"> |
15 | 88 # Unset any saved environment settings from parent virtual |
89 # environments, e.g. for python 2 or if Galaxy itself is running | |
90 # from within a virtual environment. | |
91 unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME | |
92 pyvenv MY_TOOL_venv | |
93 MY_TOOL_venv/bin/pip3 install {{NEEDED_PYTHON_PACKAGES}} | |
0 | 94 </action> |
15 | 95 |
0 | 96 <action type="set_environment"> |
15 | 97 <!-- Remove any incoming PYTHONPATH elements from Galaxy's own python 2 environment. |
98 If you want to chain multiple virtual environments so that packages installed | |
99 in all of them are visible, you need to arrange for PYTHONPATH to include the | |
100 site-packages directories of all of them, so in that case just a plain 'set_to' | |
101 would not be sufficient. | |
102 --> | |
103 <environment_variable name="PYTHONPATH" action="set_to">$INSTALL_DIR/MY_TOOL_venv/lib/python3.4/site-packages</environment_variable> | |
104 <!-- All that is really needed to use a specific virtual environment is that the | |
105 python interpreter in that environment is used, so add it to PATH --> | |
106 <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/MY_TOOL_venv/bin</environment_variable> | |
107 <!-- Clear incoming PYTHONHOME just like the venv's 'activate' command does --> | |
108 <environment_variable name="PYTHONHOME" action="set_to"></environment_variable> | |
109 <!-- To find shared libraries for python built-in modules such as libssl or libsqlite3 | |
110 we need to re-export LD_LIBRARY_PATH --> | |
111 <environment_variable name="LD_LIBRARY_PATH" action="prepend_to">$ENV[LD_LIBRARY_PATH]</environment_variable> | |
0 | 112 </action> |
113 | |
114 </readme> | |
115 | |
116 </package> | |
117 </tool_dependency> |