Skip to content

Commit 770704c

Browse files
authored
[BE] Delete unicode-flags build options (#1284)
There were relevant only for Python<=3.3
1 parent 942c854 commit 770704c

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

common/install_cpython.sh

+5-26
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,20 @@ function check_var {
1414
fi
1515
}
1616

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-
2517
function do_cpython_build {
2618
local py_ver=$1
2719
check_var $py_ver
28-
local ucs_setting=$2
29-
check_var $ucs_setting
3020
tar -xzf Python-$py_ver.tgz
3121
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}"
4024
mkdir -p ${prefix}/lib
4125

4226
# -Wformat added for https://bugs.python.org/issue17547 on Python 2.6
4327
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
4529
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
4731
fi
4832

4933
make -j40 > /dev/null
@@ -71,12 +55,7 @@ function build_cpython {
7155
check_var $PYTHON_DOWNLOAD_URL
7256
local py_ver_folder=$py_ver
7357
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
8059
rm -f Python-$py_ver.tgz
8160
}
8261

0 commit comments

Comments
 (0)