From ad900ba436733437515d37587438daba33c49d21 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Thu, 7 Feb 2013 17:32:10 +0900 Subject: [PATCH] fix some differences between ruby-build (refs #8) --- plugins/python-build/bin/pyenv-install | 4 +--- plugins/python-build/bin/python-build | 15 +++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/python-build/bin/pyenv-install b/plugins/python-build/bin/pyenv-install index cf0413d6..bbf719f3 100755 --- a/plugins/python-build/bin/pyenv-install +++ b/plugins/python-build/bin/pyenv-install @@ -81,7 +81,6 @@ DEFINITION="${ARGUMENTS[0]}" [ -n "$DEFINITION" ] || usage 1 - # Define `before_install` and `after_install` functions that allow # plugin hooks to register a string of code for execution before or # after the installation process. @@ -120,7 +119,7 @@ if [ -z "$FORCE" ] && [ -d "${PREFIX}/bin" ]; then esac fi -# If PYENV_BUILD_ROOT is set, always pass keep options to python-build +# If PYENV_BUILD_ROOT is set, always pass keep options to python-build. if [ -n "${PYENV_BUILD_ROOT}" ]; then export PYTHON_BUILD_BUILD_PATH="${PYENV_BUILD_ROOT}/${VERSION_NAME}" KEEP="-k" @@ -136,7 +135,6 @@ fi # Execute `before_install` hooks. for hook in "${before_hooks[@]}"; do eval "$hook"; done - # Invoke `python-build` and record the exit status in $STATUS. Run # `pyenv rehash` after a successful installation. STATUS=0 diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 35af6df2..7fff98a7 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -96,6 +96,10 @@ install_git() { install_package_using "git" 2 $* } +install_svn() { + install_package_using "svn" 2 $* +} + install_jar() { install_package_using "jar" 1 $* } @@ -130,7 +134,7 @@ make_package() { } compute_md5() { - if type md5 >/dev/null; then + if type md5 &>/dev/null; then md5 -q elif type openssl &>/dev/null; then local output="$(openssl md5)" @@ -341,8 +345,8 @@ build_package_standard() { fi { ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS - make $MAKE_OPTS - make install + "$MAKE" $MAKE_OPTS + "$MAKE" install } >&4 2>&1 } @@ -354,8 +358,7 @@ build_package_autoconf() { build_package_python() { local package_name="$1" - { - "$PYTHON_BIN" setup.py install + { "$PYTHON_BIN" setup.py install } >&4 2>&1 } @@ -539,7 +542,7 @@ usage() { list_definitions() { { for definition in "${PYTHON_BUILD_ROOT}/share/python-build/"*; do - test -f "${definition}" && echo "${definition##*/}" + echo "${definition##*/}" done } | sort }