1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 04:23:47 -05:00

Fix broken tests

This commit is contained in:
Yamashita Yuu
2014-11-03 00:33:44 -08:00
parent b26b83a11f
commit 4a52bfaff9
77 changed files with 146 additions and 177 deletions

View File

@@ -230,7 +230,7 @@ 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
{ candidates="$(definitions "$DEFINITION")"
here="$(dirname "${0%/*}")"
here="$(dirname "${0%/*}")/../.."
if [ -n "$candidates" ]; then
echo
echo "The following versions contain \`$DEFINITION' in the name:"
@@ -239,7 +239,7 @@ if [ "$STATUS" == "2" ]; then
echo
echo "See all available versions with \`pyenv install --list'."
echo
echo -n "If the version you need is missing, try upgrading python-build"
echo -n "If the version you need is missing, try upgrading pyenv"
if [ "$here" != "${here#$(brew --prefix 2>/dev/null)}" ]; then
printf ":\n\n"
echo " brew update && brew upgrade pyenv"

View File

@@ -89,10 +89,9 @@ os_information() {
# 10.9 -> 1009
# 10.10 -> 1010
osx_version() {
local ver="$(sw_vers -productVersion)"
local major="${ver%.*}"
local minor="${ver#*.}"
echo $(( major*100 + minor ))
local -a ver
IFS=. ver=( `sw_vers -productVersion` )
echo $(( ${ver[0]}*100 + ${ver[1]} ))
}
build_failed() {
@@ -1083,40 +1082,6 @@ require_llvm() {
fi
}
require_cc() {
local cc="$(command -v "$CC" || command -v "cc" || true)"
if [ -z "$cc" ]; then
{ echo
colorize 1 "ERROR"
echo ": This package must be compiled with cc, but python-build couldn't"
echo "find a suitable \`cc\` executable on your system. Please install cc"
echo "and try again."
echo
} >&3
return 1
fi
export CC
}
require_clang() {
local clang="$(command -v "$CC" || command -v "clang" || true)"
if [ -z "$clang" ]; then
{ echo
colorize 1 "ERROR"
echo ": This package must be compiled with clang, but python-build couldn't"
echo "find a suitable \`clang\` executable on your system. Please install clang"
echo "and try again."
echo
} >&3
return 1
fi
export CC="$clang"
}
require_java() {
local java="$(command -v java || true)"
@@ -1505,7 +1470,7 @@ build_package_ensurepip() {
version() {
local git_revision
# Read the revision from git if the remote points to "python-build" repository
if GIT_DIR="$PYTHON_BUILD_INSTALL_PREFIX/../../.git" git remote -v 2>/dev/null | grep -q /python-build; then
if GIT_DIR="$PYTHON_BUILD_INSTALL_PREFIX/../../.git" git remote -v 2>/dev/null | grep -q /pyenv; then
git_revision="$(GIT_DIR="$PYTHON_BUILD_INSTALL_PREFIX/../../.git" git describe --tags HEAD 2>/dev/null || true)"
git_revision="${git_revision#v}"
fi
@@ -1525,7 +1490,7 @@ usage() {
list_definitions() {
{ for DEFINITION_DIR in "${PYTHON_BUILD_DEFINITIONS[@]}"; do
[ -d "$DEFINITION_DIR" ] && ls "$DEFINITION_DIR"
[ -d "$DEFINITION_DIR" ] && find "$DEFINITION_DIR" -maxdepth 1 -type f -print0 | xargs -0 -n 1 basename 2>/dev/null
done
} | sort_versions | uniq
}
@@ -1755,18 +1720,14 @@ if [ -n "${PIP_VERSION}" ]; then
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
fi
## Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
#if [[ "Darwin" == "$(uname -s)" ]]; then
# MACOS_VERSION="$(sw_vers -productVersion 2>/dev/null || true)"
# MACOS_VERSION_ARRAY=(${MACOS_VERSION//\./ })
# if [ "${#MACOS_VERSION_ARRAY[@]}" -ge 2 ]; then
# export MACOSX_DEPLOYMENT_TARGET="${MACOS_VERSION_ARRAY[0]}.${MACOS_VERSION_ARRAY[1]}"
# else
# { colorize 1 "WARNING"
# echo ": Could not detect the product version of OS X for MACOSX_DEPLOYMENT_TARGET. Use default setting."
# } >&2
# fi
#fi
# Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
if [[ "Darwin" == "$(uname -s)" ]]; then
MACOS_VERSION="$(sw_vers -productVersion 2>/dev/null || true)"
MACOS_VERSION_ARRAY=(${MACOS_VERSION//\./ })
if [ "${#MACOS_VERSION_ARRAY[@]}" -ge 2 ]; then
export MACOSX_DEPLOYMENT_TARGET="${MACOS_VERSION_ARRAY[0]}.${MACOS_VERSION_ARRAY[1]}"
fi
fi
python_bin_suffix() {
local version_name version_info