Use version suffixed executable (e.g. python3.4) for internal use of python (#255)

This commit is contained in:
Yamashita Yuu 2014-10-19 00:13:49 +09:00
parent 45b45bcf25
commit eef8ac2701

View file

@ -1687,9 +1687,25 @@ if [[ "Darwin" == "$(uname -s)" ]]; then
fi
fi
python_bin_suffix() {
local version_name version_info
case "$1" in
2.* | 3.* )
version_name="$1"
version_info=(${version_name//./ })
echo "${version_info[0]}.${version_info[1]}"
;;
stackless-2.* | stackless-3.* )
version_name="${1#stackless-}"
version_info=(${version_name//./ })
echo "${version_info[0]}.${version_info[1]}"
;;
esac
}
SEED="$(date "+%Y%m%d%H%M%S").$$"
LOG_PATH="${TMP}/python-build.${SEED}.log"
PYTHON_BIN="${PREFIX_PATH}/bin/python"
PYTHON_BIN="${PREFIX_PATH}/bin/python$(python_bin_suffix "${DEFINITION_PATH##*/}")"
CWD="$(pwd)"
if [ -z "$PYTHON_BUILD_BUILD_PATH" ]; then