# Python 2.7.18 released 20200420
# OpenSSL 1.1.1 released 20180911
# Python 2.7.8 released 20140630
#
# Python 2.7.8 with OpenSSL 1.1.1 gives:
# ERROR:root:code for hash md5 was not found.
# ERROR:root:code for hash sha1 was not found.
# ERROR:root:code for hash sha224 was not found.
# ERROR:root:code for hash sha256 was not found.
# ERROR:root:code for hash sha384 was not found.
# ERROR:root:code for hash sha512 was not found.

# Exit on error:
set -e

wget https://python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
tar xf Python-2.7.18.tar.xz
cd Python-2.7.18

./configure \
    --prefix= \
    --enable-shared

make install
cd ..
rm -rf Python-2.7.18
rm Python-2.7.18.tar.xz

# Fix permissions for Package Users:
chmod g+w,o+t /lib/python2.7
chmod g+w,o+t /lib/python2.7/site-packages

exit 0
