1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 20:13:47 -05:00

Import changes from ruby-build v20131225.1

This commit is contained in:
Yamashita Yuu
2013-12-27 18:44:54 +09:00
parent b70dcb9f2d
commit 1f76effbfb
2 changed files with 49 additions and 18 deletions

View File

@@ -1,17 +1,21 @@
#!/usr/bin/env bash
#
# Summary: Install a Python version using the python-build plugin
# Summary: Install a Python version using python-build
#
# Usage: pyenv install [-f|--force] [-g|--debug] [-k|--keep] [-v|--verbose] <version>
# pyenv install [-f|--force] [-g|--debug] [-k|--keep] [-v|--verbose] <definition-file>
# Usage: pyenv install [-f] [-kvp] <version>
# pyenv install [-f] [-kvp] <definition-file>
# pyenv install -l|--list
#
# -l/--list List all available versions
# -f/--force Install even if the version appears to be installed already
#
# python-build options:
#
# -k/--keep Keep source tree in $PYENV_BUILD_ROOT after installation
# (defaults to $PYENV_ROOT/sources)
# -g/--debug Build a debug version
# -v/--verbose Verbose mode: print compilation status to stdout
# -p/--patch Apply a patch from stdin before building
# -g/--debug Build a debug version
#
# For detailed information on installing Python versions with
# python-build, including a list of environment variables for adjusting
@@ -50,6 +54,7 @@ indent() {
unset FORCE
unset KEEP
unset VERBOSE
unset HAS_PATCH
unset DEBUG
parse_options "$@"
@@ -72,6 +77,9 @@ for option in "${OPTIONS[@]}"; do
"v" | "verbose" )
VERBOSE="-v"
;;
"p" | "patch" )
HAS_PATCH="-p"
;;
"g" | "debug" )
DEBUG="-g"
;;
@@ -167,7 +175,7 @@ trap cleanup SIGINT
# Invoke `python-build` and record the exit status in $STATUS.
STATUS=0
python-build $KEEP $VERBOSE $DEBUG "$DEFINITION" "$PREFIX" || STATUS="$?"
python-build $KEEP $VERBOSE $HAS_PATCH $DEBUG "$DEFINITION" "$PREFIX" || STATUS="$?"
# Display a more helpful message if the definition wasn't found.
if [ "$STATUS" == "2" ]; then