Okay, I've done some researches. Some theory:
Basically, OpenSSL is a library libssl and crypto - libcrypto. But we need just a libssl. And, the most interesting thing, it depends on basic things.
I want to use PyGithub, so i need to make it able to use HTTPSConnection httplib class. To use it, it needs _ssl module. _ssl module, in Linux, is a _ssl.so, module, compiled with shared library libssl.
So, the goal is to compile _ssl.so with static libssl. Here we go:
1. Download Python 2.6.6(as SublimeText2 uses) & untar
2. Download OpenSSL. I want to use latest - 1.0.1c & untar
3. cd srctmp/openssl && ./config --prefix=/home/deoteo/srctmp/local/ --openssldir=/home/deoteo/srctmp/local/openssl -fPIC
4. make -j5 (nah, it uses just 2) && make test && make install
5. cd srctmp/python && ./configure --prefix=/home/rhgp/srctmp/local/ --enable-unicode=ucs4 //yea, python from st2 compiled with unicode_wide
6. Modify Setup in python/Modules to use needed openssl
7. make -j5
8. make install
Something like this. And now I got python 2.6.6, similar to bundled with ST2. But with latest OpenSSL support.
Some proofs:
>>> import ssl
>>> ssl
<module 'ssl' from '/home/deoteo/Dropbox/tools/st2curr/lib/python26.zip/ssl.pyo'>
>>> ssl._ssl
<module '_ssl' from './_ssl.so'>
>>> import github
>>> github
<module 'github' from './github/__init__.pyc'>
>>> g = github.Github("iorlas", "supermegapassword321").get_user().get_repos()
>>> list(g)
<httplib.HTTPSConnection instance at 0x3a8b6c8> api.github.com /user/repos
[<github.Repository.Repository object at 0x3a8a710>, <github.Repository.Repository object at 0x3b74710>, <github.Repository.Repository object at 0x3b74890>, <github.Repository.Repository object at 0x3b74a10>, <github.Repository.Repository object at 0x3b74b90>, <github.Repository.Repository object at 0x3b74cd0>, <github.Repository.Repository object at 0x3b74e50>, <github.Repository.Repository object at 0x3b74fd0>, <github.Repository.Repository object at 0x3b7b190>, <github.Repository.Repository object at 0x3b7b310>, <github.Repository.Repository object at 0x3b7b490>, <github.Repository.Repository object at 0x3b7b610>, <github.Repository.Repository object at 0x3b7b790>, <github.Repository.Repository object at 0x3b7b910>]
So, maybe it is possible to build few _ssl.so and another libraries for common systems and distribute it with ST2?