Просмотр исходного кода

Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (fixes #296)

pull/312/head
Yamashita Yuu 11 лет назад
Родитель
Сommit
cbd246acff
1 измененных файлов: 12 добавлений и 4 удалений
  1. +12
    -4
      plugins/python-build/bin/python-build

+ 12
- 4
plugins/python-build/bin/python-build Просмотреть файл

@ -1338,13 +1338,21 @@ verify_python() {
# Not create symlinks on `altinstall` (#255) # Not create symlinks on `altinstall` (#255)
if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then
local suffix="${1#python}" local suffix="${1#python}"
local file
local file link
shopt -s nullglob shopt -s nullglob
for file in "${PREFIX_PATH}/bin"/*; do for file in "${PREFIX_PATH}/bin"/*; do
local link
unset link
case "${file}" in case "${file}" in
*"-${suffix}" ) link="${file%%-${suffix}}" ;;
*"${suffix}" ) link="${file%%${suffix}}" ;;
*/"python${suffix}-config" )
# Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (#296)
link="${file%/*}/python-config"
;;
*/*"-${suffix}" )
link="${file%%-${suffix}}"
;;
*/*"${suffix}" )
link="${file%%${suffix}}"
;;
esac esac
if [ -n "$link" ] && [ ! -e "$link" ]; then if [ -n "$link" ] && [ ! -e "$link" ]; then
( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" ) ( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" )

Загрузка…
Отмена
Сохранить