@@ -14,36 +14,20 @@ function check_var {
14
14
fi
15
15
}
16
16
17
- function lex_pyver {
18
- # Echoes Python version string padded with zeros
19
- # Thus:
20
- # 3.2.1 -> 003002001
21
- # 3 -> 003000000
22
- echo $1 | awk -F " ." ' {printf "%03d%03d%03d", $1, $2, $3}'
23
- }
24
-
25
17
function do_cpython_build {
26
18
local py_ver=$1
27
19
check_var $py_ver
28
- local ucs_setting=$2
29
- check_var $ucs_setting
30
20
tar -xzf Python-$py_ver .tgz
31
21
pushd Python-$py_ver
32
- if [ " $ucs_setting " = " none" ]; then
33
- unicode_flags=" "
34
- dir_suffix=" "
35
- else
36
- local unicode_flags=" --enable-unicode=$ucs_setting "
37
- local dir_suffix=" -$ucs_setting "
38
- fi
39
- local prefix=" /opt/_internal/cpython-${py_ver}${dir_suffix} "
22
+
23
+ local prefix=" /opt/_internal/cpython-${py_ver} "
40
24
mkdir -p ${prefix} /lib
41
25
42
26
# -Wformat added for https://bugs.python.org/issue17547 on Python 2.6
43
27
if [[ -z " ${WITH_OPENSSL+x} " ]]; then
44
- CFLAGS=" -Wformat" ./configure --prefix=${prefix} --disable-shared $unicode_flags > /dev/null
28
+ CFLAGS=" -Wformat" ./configure --prefix=${prefix} --disable-shared > /dev/null
45
29
else
46
- CFLAGS=" -Wformat" ./configure --prefix=${prefix} --with-openssl=${WITH_OPENSSL} --with-openssl-rpath=auto --disable-shared $unicode_flags > /dev/null
30
+ CFLAGS=" -Wformat" ./configure --prefix=${prefix} --with-openssl=${WITH_OPENSSL} --with-openssl-rpath=auto --disable-shared > /dev/null
47
31
fi
48
32
49
33
make -j40 > /dev/null
@@ -71,12 +55,7 @@ function build_cpython {
71
55
check_var $PYTHON_DOWNLOAD_URL
72
56
local py_ver_folder=$py_ver
73
57
wget -q $PYTHON_DOWNLOAD_URL /$py_ver_folder /Python-$py_ver .tgz
74
- if [ $( lex_pyver $py_ver ) -lt $( lex_pyver 3.3) ]; then
75
- do_cpython_build $py_ver ucs2
76
- do_cpython_build $py_ver ucs4
77
- else
78
- do_cpython_build $py_ver none
79
- fi
58
+ do_cpython_build $py_ver none
80
59
rm -f Python-$py_ver .tgz
81
60
}
82
61
0 commit comments