Mercurial > repos > jankanis > package_python3_4
comparison tool_dependencies.xml @ 3:d71cfcee2977 draft
Fix openssl search path in setup.py
| author | jankanis |
|---|---|
| date | Thu, 22 May 2014 10:52:19 -0400 |
| parents | ab42c5133d1c |
| children | 9491d3c0dbe6 |
comparison
equal
deleted
inserted
replaced
| 2:ab42c5133d1c | 3:d71cfcee2977 |
|---|---|
| 11 <action type="set_environment_for_install"> | 11 <action type="set_environment_for_install"> |
| 12 <repository changeset_revision="1c167e73d30f" name="package_openssl" owner="jankanis" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu"> | 12 <repository changeset_revision="1c167e73d30f" name="package_openssl" owner="jankanis" prior_installation_required="True" toolshed="http://toolshed.g2.bx.psu.edu"> |
| 13 <package name="openssl" version="1.0.1g" /> | 13 <package name="openssl" version="1.0.1g" /> |
| 14 </repository> | 14 </repository> |
| 15 </action> | 15 </action> |
| 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 | |
| 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 | |
| 58 </action> | |
| 16 <action type="autoconf">--prefix=$INSTALL_DIR</action> | 59 <action type="autoconf">--prefix=$INSTALL_DIR</action> |
| 17 <action type="set_environment"> | 60 <action type="set_environment"> |
| 18 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> | 61 <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> |
| 19 <!-- empty PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path--> | 62 <!-- empty PYTHONPATH, otherwise we will get Galaxy's Python 2 libraries in the Python 3 path--> |
| 20 <environment_variable action="set_to" name="PYTHONPATH" /> | 63 <environment_variable action="set_to" name="PYTHONPATH" /> |
| 37 <action type="shell_command"> | 80 <action type="shell_command"> |
| 38 # Unset any saved environment settings from parent virtual | 81 # Unset any saved environment settings from parent virtual |
| 39 # environments, e.g. for python 2 or if Galaxy itself is running | 82 # environments, e.g. for python 2 or if Galaxy itself is running |
| 40 # from within a virtual environment. | 83 # from within a virtual environment. |
| 41 unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME | 84 unset _OLD_VIRTUAL_PATH; unset _OLD_VIRTUAL_PYTHONHOME |
| 42 pyvenv {{$MY_PACKAGE_NAME}} | 85 pyvenv {{\$MY_PACKAGE_NAME}} |
| 43 . {{$MY_PACKAGE_NAME}}/bin/activate | 86 . {{\$MY_PACKAGE_NAME}}/bin/activate |
| 44 pip install {{$PYTHON-PACKAGE}} | 87 pip3 install {{\$PYTHON-PACKAGE}} |
| 45 </action> | 88 </action> |
| 46 <action type="set_environment"> | 89 <action type="set_environment"> |
| 47 <environment_variable name="PYTHONPATH" action="prepend_to">$INSTALL_DIR/lib/python3.4/site-packages:$INSTALL_DIR/lib64/python3.4/iste-packages</environment_variable> | 90 <environment_variable name="PYTHONPATH" action="prepend_to">\$INSTALL_DIR/lib/python3.4/site-packages</environment_variable> |
| 48 </action> | 91 </action> |
| 49 | 92 |
| 50 </readme> | 93 </readme> |
| 51 | 94 |
| 52 </package> | 95 </package> |
