You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
772 B
35 lines
772 B
5 years ago
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
5 years ago
|
VERSION=${1:-3.7.3}
|
||
|
|
||
5 years ago
|
# Python 3.6 stands in our way -- nuking it
|
||
|
yum erase -y rh-python36
|
||
|
rm -rf /opt/rh/rh-python36
|
||
|
|
||
|
yum install -y gcc bzip2-devel libffi-devel zlib-devel
|
||
|
|
||
|
cd /usr/src/
|
||
|
|
||
|
# pip3.7 needs new openssl
|
||
|
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz
|
||
|
tar -zxvf OpenSSL_1_1_1c.tar.gz
|
||
|
cd openssl-OpenSSL_1_1_1c
|
||
|
./Configure shared zlib linux-x86_64
|
||
|
make -sj4
|
||
|
make install
|
||
|
cd ..
|
||
|
rm -rf openssl-OpenSSL_1_1_1c
|
||
|
|
||
|
# Fixing libssl.so.1.1: cannot open shared object file
|
||
|
echo "/usr/local/lib64" >> /etc/ld.so.conf && ldconfig
|
||
|
|
||
5 years ago
|
curl -O -L https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz
|
||
|
tar xzf Python-${VERSION}.tgz
|
||
|
cd Python-${VERSION}
|
||
5 years ago
|
./configure
|
||
|
make -sj4
|
||
|
make install
|
||
|
cd ..
|
||
5 years ago
|
rm -rf Python-${VERSION}
|