@@ -20,47 +20,47 @@ _SSL_LIB=""
20
20
21
21
# preinstall dependencies and define variables
22
22
case " ${_BASE_NAME} " in
23
- * ubuntu22.04* )
24
- echo " Skip install Python3.10 from source on Ubuntu22.04"
25
- exit 0;
26
- ;;
27
- * debian* | * ubuntu* )
28
- apt update
29
- apt install -y libsqlite3-dev libreadline-dev
30
- ;;
31
- * rhel* )
32
- yum install -y sqlite-devel readline-devel xz-devel
33
- ;;
34
- * tencentos3.1* )
35
- dnf install -y sqlite-devel readline-devel zlib-devel xz-devel bzip2-devel libffi-devel
36
- wget -nv -O /opt/openssl-1.1.1w.tar.gz https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz && \
37
- cd /opt/ && \
38
- tar xzf openssl-1.1.1w.tar.gz && \
39
- rm -rf openssl-1.1.1w.tar.gz && \
40
- cd openssl-1.1.1w && \
41
- ./config --prefix=/usr/local/openssl-1.1.1w shared zlib && \
42
- make && make install
43
- ln -s /etc/pki/tls/cert.pem /usr/local/openssl-1.1.1w/ssl/cert.pem
23
+ * ubuntu22.04* )
24
+ echo " Skip install Python3.10 from source on Ubuntu22.04"
25
+ exit 0
26
+ ;;
27
+ * debian* | * ubuntu* )
28
+ apt update
29
+ apt install -y libsqlite3-dev libreadline-dev
30
+ ;;
31
+ * rhel* )
32
+ yum install -y sqlite-devel readline-devel xz-devel
33
+ ;;
34
+ * tencentos3.1* )
35
+ dnf install -y sqlite-devel readline-devel zlib-devel xz-devel bzip2-devel libffi-devel
36
+ wget -nv -O /opt/openssl-1.1.1w.tar.gz https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz &&
37
+ cd /opt/ &&
38
+ tar xzf openssl-1.1.1w.tar.gz &&
39
+ rm -rf openssl-1.1.1w.tar.gz &&
40
+ cd openssl-1.1.1w &&
41
+ ./config --prefix=/usr/local/openssl-1.1.1w shared zlib &&
42
+ make && make install
43
+ ln -s /etc/pki/tls/cert.pem /usr/local/openssl-1.1.1w/ssl/cert.pem
44
44
45
- PATH=$PATH :/usr/local/protoc/bin:/usr/local/openssl-1.1.1w/bin
46
- LD_LIBRARY_PATH=/usr/local/openssl-1.1.1w/lib:$LD_LIBRARY_PATH
47
- _SSL_LIB=" --with-openssl=/usr/local/openssl-1.1.1w"
48
- ;;
49
- * amzn2* )
50
- yum install -y sqlite-devel readline-devel
51
- wget -nv -O /opt/openssl-1.1.1w.tar.gz https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz && \
52
- cd /opt/ && \
53
- tar xzf openssl-1.1.1w.tar.gz && \
54
- rm -rf openssl-1.1.1w.tar.gz && \
55
- cd openssl-1.1.1w && \
56
- ./config --prefix=/usr/local/openssl-1.1.1w shared zlib && \
57
- make && make install
58
- ln -s /etc/pki/tls/cert.pem /usr/local/openssl-1.1.1w/ssl/cert.pem
45
+ PATH=$PATH :/usr/local/protoc/bin:/usr/local/openssl-1.1.1w/bin
46
+ LD_LIBRARY_PATH=/usr/local/openssl-1.1.1w/lib:$LD_LIBRARY_PATH
47
+ _SSL_LIB=" --with-openssl=/usr/local/openssl-1.1.1w"
48
+ ;;
49
+ * amzn2* )
50
+ yum install -y sqlite-devel readline-devel
51
+ wget -nv -O /opt/openssl-1.1.1w.tar.gz https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz &&
52
+ cd /opt/ &&
53
+ tar xzf openssl-1.1.1w.tar.gz &&
54
+ rm -rf openssl-1.1.1w.tar.gz &&
55
+ cd openssl-1.1.1w &&
56
+ ./config --prefix=/usr/local/openssl-1.1.1w shared zlib &&
57
+ make && make install
58
+ ln -s /etc/pki/tls/cert.pem /usr/local/openssl-1.1.1w/ssl/cert.pem
59
59
60
- PATH=$PATH :/usr/local/protoc/bin:/usr/local/openssl-1.1.1w/bin
61
- LD_LIBRARY_PATH=/usr/local/openssl-1.1.1w/lib:$LD_LIBRARY_PATH
62
- _SSL_LIB=" --with-openssl=/usr/local/openssl-1.1.1w"
63
- ;;
60
+ PATH=$PATH :/usr/local/protoc/bin:/usr/local/openssl-1.1.1w/bin
61
+ LD_LIBRARY_PATH=/usr/local/openssl-1.1.1w/lib:$LD_LIBRARY_PATH
62
+ _SSL_LIB=" --with-openssl=/usr/local/openssl-1.1.1w"
63
+ ;;
64
64
esac
65
65
66
66
# install Python
@@ -74,30 +74,30 @@ make -j && make altinstall
74
74
75
75
# post install
76
76
case " ${_BASE_NAME} " in
77
- * rhel9* )
78
- alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 2 && \
79
- alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
80
- alternatives --set python3 /usr/local/bin/python3.10
81
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
82
- ;;
83
- * tencentos3.1* )
84
- alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 4 && \
85
- alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3 && \
86
- alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 && \
87
- alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 && \
88
- alternatives --set python3 /usr/local/bin/python3.10
89
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
90
- ;;
91
- * amzn2* )
92
- update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 3 && \
93
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 && \
94
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
95
- ;;
96
- * debian* )
97
- update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 3
98
- update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 2
99
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
100
- ;;
77
+ * rhel9* )
78
+ alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 2 &&
79
+ alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 &&
80
+ alternatives --set python3 /usr/local/bin/python3.10
81
+ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
82
+ ;;
83
+ * tencentos3.1* )
84
+ alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 4 &&
85
+ alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3 &&
86
+ alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 &&
87
+ alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 &&
88
+ alternatives --set python3 /usr/local/bin/python3.10
89
+ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
90
+ ;;
91
+ * amzn2* )
92
+ update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 3 &&
93
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 &&
94
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
95
+ ;;
96
+ * debian* )
97
+ update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 3
98
+ update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 2
99
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
100
+ ;;
101
101
esac
102
102
103
103
python3 -m pip install --upgrade pip setuptools
0 commit comments