diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index fef4260a..e22cfc5a 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1850,6 +1850,11 @@ if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then package_option python configure --enable-universalsdk=/ --with-universal-archs=intel fi +# Compile with `--enable-unicode=ucs4` by default (#257) +if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then + package_option python configure --enable-unicode=ucs4 +fi + # SSL Certificate error with older wget that does not support Server Name Indication (#60) if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2 diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index b8aa3acd..c14ea61a 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -77,7 +77,7 @@ yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib +Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 make -j 2 make install OUT @@ -105,7 +105,7 @@ make -j 2 make install patch -p0 --force -i $TMP/python-patch.XXX Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib +Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 make -j 2 make install OUT @@ -133,7 +133,7 @@ make -j 2 make install patch -p1 --force -i $TMP/python-patch.XXX Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib +Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 make -j 2 make install OUT @@ -156,7 +156,7 @@ OUT assert_build_log <> build.log" \ + " : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" + + PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null + assert_success + + assert_build_log <