Mercurial > repos > jankanis > package_python3_4
annotate tool_dependencies.xml @ 5:fb4d95141633 draft
update dependency to latest openssl that builds shared libraries
author | jankanis |
---|---|
date | Thu, 22 May 2014 11:14:11 -0400 |
parents | 9491d3c0dbe6 |
children | 321cacd4ae43 |
rev | line source |
---|---|
0 | 1 <?xml version="1.0"?> |
2 <tool_dependency> | |
3 <package name="openssl" version="1.0.1g"> | |
5
fb4d95141633
update dependency to latest openssl that builds shared libraries
jankanis
parents:
4
diff
changeset
|
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 | |
7 <package name="python3" version="3.4.1"> | |
8 <install version="1.0"> | |
9 <actions> | |
1 | 10 <action type="download_by_url">https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz</action> |
0 | 11 <action type="set_environment_for_install"> |
5
fb4d95141633
update dependency to latest openssl that builds shared libraries
jankanis
parents:
4
diff
changeset
|
12 <repository changeset_revision="23ebff671a20" name="package_openssl" owner="jankanis" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu"> |
0 | 13 <package name="openssl" version="1.0.1g" /> |
14 </repository> | |
15 </action> | |
4 | 16 <!-- |
17 Python3 config doesn't search for some optional dependencies | |
18 in non-standard locations. Patch config.py to also look at | |
19 the repositories we just installed above | |
20 --> | |
21 <action type="shell_command"> | |
22 patch << EOF | |
3 | 23 --- a/setup.py |
24 +++ b/setup.py | |
25 @@ -750,10 +750,14 @@ | |
26 exts.append( Extension('_socket', ['socketmodule.c'], | |
27 depends = ['socketmodule.h']) ) | |
28 # Detect SSL support for the socket module (via _ssl) | |
29 + CUSTOM_OPENSSL = os.environ.get('OPENSSL_ROOT_DIR') | |
30 search_for_ssl_incs_in = [ | |
31 '/usr/local/ssl/include', | |
32 '/usr/contrib/ssl/include/' | |
33 ] | |
34 + if CUSTOM_OPENSSL: | |
35 + search_for_ssl_incs_in.append(os.path.join(CUSTOM_OPENSSL, 'include')) | |
36 + | |
37 ssl_incs = find_file('openssl/ssl.h', inc_dirs, | |
38 search_for_ssl_incs_in | |
39 ) | |
40 @@ -762,10 +766,12 @@ | |
41 ['/usr/kerberos/include']) | |
42 if krb5_h: | |
43 ssl_incs += krb5_h | |
44 - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, | |
45 - ['/usr/local/ssl/lib', | |
46 - '/usr/contrib/ssl/lib/' | |
47 - ] ) | |
48 + | |
49 + search_for_ssl_libs_in = ['/usr/local/ssl/lib', | |
50 + '/usr/contrib/ssl/lib/'] | |
51 + if CUSTOM_OPENSSL: | |
52 + search_for_ssl_libs_in.append(os.path.join(CUSTOM_OPENSSL, 'lib')) | |
53 + ssl_libs = find_library_file(self.compiler, 'ssl', lib_dirs, search_for_ssl_libs_in) | |
54 | |
55 if (ssl_incs is not None and | |
56 ssl_libs is not None): | |
57 EOF | |
4 | 58 </action> |
59 <action type="autoconf">--prefix=$INSTALL_DIR --with-ensurepip</action> | |
1 | 60 <action type="set_environment"> |
61 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> | |
62 <!-- empty PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path--> | |
63 <environment_variable action="set_to" name="PYTHONPATH" /> | |
64 <environment_variable action="set_to" name="PYTHONHOME">$INSTALL_DIR</environment_variable> | |
4 | 65 <environment_variable action="prepend_to" name="PKG_CONFIG_PATH">$INSTALL_DIR/lib/pkgconfig</environment_variable> |
1 | 66 </action> |
0 | 67 </actions> |
68 </install> | |
69 | |
70 <readme> | |
71 Python 3.4.1. Configured with the default settings, using --prefix=$INSTALL_DIR. | |
72 | |
73 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: | |
74 | |
75 <action type="set_environment_for_install"> | |
1 | 76 <repository name="python3" owner="jankanis"> |
0 | 77 <package name="python3" version="3.4.1" /> |
1 | 78 </repository> |
0 | 79 </action> |
80 <action type="shell_command"> | |
1 | 81 # Unset any saved environment settings from parent virtual |
82 # environments, e.g. for python 2 or if Galaxy itself is running | |
83 # from within a virtual environment. | |
84 unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME | |
3 | 85 pyvenv {{\$MY_PACKAGE_NAME}} |
86 . {{\$MY_PACKAGE_NAME}}/bin/activate | |
87 pip3 install {{\$PYTHON-PACKAGE}} | |
0 | 88 </action> |
89 <action type="set_environment"> | |
3 | 90 <environment_variable name="PYTHONPATH" action="prepend_to">\$INSTALL_DIR/lib/python3.4/site-packages</environment_variable> |
0 | 91 </action> |
92 | |
93 </readme> | |
94 | |
95 </package> | |
96 </tool_dependency> |