Always create bin as symlink to framework path if the version was built with --enable-frameowrk (#590)

Actually I'm not 100% sure what was going on, but it seems CPython build
script may create `bin` as directory instead of symlink even if
`--enable-framework` was specified.
This commit is contained in:
Yamashita, Yuu 2016-08-03 10:48:44 +09:00
parent 7da05ee964
commit bc8dba4bea

View file

@ -1467,7 +1467,11 @@ apply_python_patch() {
}
build_package_symlink_version_suffix() {
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]] && [ ! -e "${PREFIX_PATH}/bin" ]; then
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
if [ -e "${PREFIX_PATH}/bin" ]; then
# Always create `bin` as symlink to framework path if the version was built with `--enable-frameowrk` (#590)
mv -f "${PREFIX_PATH}/bin" "${PREFIX_PATH}/bin.orig"
fi
# Only symlinks are installed in ${PREFIX_PATH}/bin
ln -fs "${PREFIX_PATH}/Python.framework/Versions/Current/bin" "${PREFIX_PATH}/bin"
fi