Just focusing on ssl alone the answer are many:
https://serverfault.com/questions/353128/recompiling-python-with-ssl-support-on-ubuntu
https://mail.python.org/pipermail/python-ideas/2014-May/027866.html
http://stackoverflow.com/questions/22409092/coredump-when-compiling-python-with-a-custom-openssl-versionhttps://stackoverflow.com/questions/22409092/coredump-when-compiling-python-with-a-custom-openssl-version
http://stackoverflow.com/questions/5937337/installing-python-with-ssl-support-in-localhttps://stackoverflow.com/questions/5937337/installing-python-with-ssl-support-in-local
http://stackoverflow.com/questions/18516956/how-to-compile-python-2-4-6-with-ssl-readline-and-zlib-on-debian-lennyhttps://stackoverflow.com/questions/18516956/how-to-compile-python-2-4-6-with-ssl-readline-and-zlib-on-debian-lenny
https://bugs.python.org/issue21541
And no - definitely you don't need the original SSL sources, just "apt-get install libssl-dev" will do.