mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 06:13:53 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6509d318f4 | ||
|
|
474767618d | ||
|
|
82aaef7842 | ||
|
|
9df0a2916d | ||
|
|
f76309d419 | ||
|
|
29d3df661e | ||
|
|
96b4c0f7e7 | ||
|
|
f9053406c2 | ||
|
|
ae4659538d | ||
|
|
4159055117 | ||
|
|
aa62882347 |
@@ -1,5 +1,13 @@
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
#### 20140825
|
||||||
|
|
||||||
|
* pyenv: Fix zsh completion with multiple words (#215)
|
||||||
|
* python-build: Display the package name of `hg` as `mercurial` in message (#212)
|
||||||
|
* python-build: Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||||
|
* python-build: Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
|
||||||
|
* python-build: Add new Jython release; jython2.7-beta3 (#223)
|
||||||
|
|
||||||
#### 20140705
|
#### 20140705
|
||||||
|
|
||||||
* python-build: Add new CPython release; 2.7.8 (#201)
|
* python-build: Add new CPython release; 2.7.8 (#201)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ _pyenv() {
|
|||||||
if [ "${#words}" -eq 2 ]; then
|
if [ "${#words}" -eq 2 ]; then
|
||||||
completions="$(pyenv commands)"
|
completions="$(pyenv commands)"
|
||||||
else
|
else
|
||||||
completions="$(pyenv completions "${words[2,-2]}")"
|
completions="$(pyenv completions ${words[2,-2]})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
reply=("${(ps:\n:)completions}")
|
reply=("${(ps:\n:)completions}")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
version="20140705"
|
version="20140825"
|
||||||
|
|
||||||
if cd "$PYENV_ROOT" 2>/dev/null; then
|
if cd "$PYENV_ROOT" 2>/dev/null; then
|
||||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ fetch_hg() {
|
|||||||
|
|
||||||
hg clone --branch "$hg_ref" "$hg_url" "${package_name}" >&4 2>&1
|
hg clone --branch "$hg_ref" "$hg_url" "${package_name}" >&4 2>&1
|
||||||
else
|
else
|
||||||
echo "error: please install \`hg\` and try again" >&2
|
echo "error: please install \`mercurial\` and try again" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -1603,6 +1603,10 @@ fi
|
|||||||
|
|
||||||
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
|
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
|
||||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||||
|
if [[ "Darwin" != "$(uname -s)" ]]; then
|
||||||
|
echo "python-build: framework installation is not supported." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
create_framework_dirs() {
|
create_framework_dirs() {
|
||||||
local version="$(echo "$1" | sed -E 's/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/')"
|
local version="$(echo "$1" | sed -E 's/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/')"
|
||||||
mkdir -p "${PREFIX_PATH}/Python.framework/Versions/${version}"
|
mkdir -p "${PREFIX_PATH}/Python.framework/Versions/${version}"
|
||||||
@@ -1617,12 +1621,25 @@ if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
|||||||
package_option python configure --enable-framework="${PREFIX_PATH}"
|
package_option python configure --enable-framework="${PREFIX_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Build against universal SDK (#219, #220)
|
||||||
|
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
|
||||||
|
if [[ "Darwin" != "$(uname -s)" ]]; then
|
||||||
|
echo "python-build: universal installation is not supported." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
package_option python configure --enable-universalsdk=/ --with-universal-archs=intel
|
||||||
|
fi
|
||||||
|
|
||||||
# SSL Certificate error with older wget that does not support Server Name Indication (#60)
|
# SSL Certificate error with older wget that does not support Server Name Indication (#60)
|
||||||
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then
|
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then
|
||||||
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2
|
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||||
|
unset PIP_REQUIRE_VENV
|
||||||
|
unset PIP_REQUIRE_VIRTUALENV
|
||||||
|
|
||||||
# pydistutils.cfg may corrupt install location of Python libraries (#35, #111)
|
# pydistutils.cfg may corrupt install location of Python libraries (#35, #111)
|
||||||
if [ -e "$HOME/.pydistutils.cfg" ]; then
|
if [ -e "$HOME/.pydistutils.cfg" ]; then
|
||||||
{ colorize 1 "WARNING"
|
{ colorize 1 "WARNING"
|
||||||
@@ -1638,6 +1655,19 @@ if [ -n "${PIP_VERSION}" ]; then
|
|||||||
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
|
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
|
||||||
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]}"
|
||||||
|
else
|
||||||
|
{ colorize 1 "WARNING"
|
||||||
|
echo ": Could not detect the product version of OS X for MACOSX_DEPLOYMENT_TARGET. Use default setting."
|
||||||
|
} >&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SEED="$(date "+%Y%m%d%H%M%S").$$"
|
SEED="$(date "+%Y%m%d%H%M%S").$$"
|
||||||
LOG_PATH="${TMP}/python-build.${SEED}.log"
|
LOG_PATH="${TMP}/python-build.${SEED}.log"
|
||||||
PYTHON_BIN="${PREFIX_PATH}/bin/python"
|
PYTHON_BIN="${PREFIX_PATH}/bin/python"
|
||||||
|
|||||||
5
plugins/python-build/share/python-build/jython-2.7-beta3
Normal file
5
plugins/python-build/share/python-build/jython-2.7-beta3
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
require_java
|
||||||
|
install_jar "jython-2.7-beta3" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b3/jython-installer-2.7-b3.jar" jython ez_setup
|
||||||
|
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
|
||||||
|
# * https://github.com/yyuu/pyenv/issues/15
|
||||||
|
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python
|
||||||
@@ -216,6 +216,7 @@ OUT
|
|||||||
@test "number of CPU cores defaults to 2" {
|
@test "number of CPU cores defaults to 2" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.2.1"
|
||||||
|
|
||||||
|
stub uname '-s : echo Darwin'
|
||||||
stub uname '-s : echo Darwin'
|
stub uname '-s : echo Darwin'
|
||||||
stub sysctl false
|
stub sysctl false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
@@ -240,6 +241,7 @@ OUT
|
|||||||
@test "number of CPU cores is detected on Mac" {
|
@test "number of CPU cores is detected on Mac" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.2.1"
|
||||||
|
|
||||||
|
stub uname '-s : echo Darwin'
|
||||||
stub uname '-s : echo Darwin'
|
stub uname '-s : echo Darwin'
|
||||||
stub sysctl '-n hw.ncpu : echo 4'
|
stub sysctl '-n hw.ncpu : echo 4'
|
||||||
stub_make_install
|
stub_make_install
|
||||||
@@ -316,6 +318,7 @@ OUT
|
|||||||
@test "make on FreeBSD defaults to gmake" {
|
@test "make on FreeBSD defaults to gmake" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.2.1"
|
||||||
|
|
||||||
|
stub uname "-s : echo FreeBSD"
|
||||||
stub uname "-s : echo FreeBSD"
|
stub uname "-s : echo FreeBSD"
|
||||||
MAKE=gmake stub_make_install
|
MAKE=gmake stub_make_install
|
||||||
|
|
||||||
@@ -389,3 +392,37 @@ OUT
|
|||||||
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
|
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
|
||||||
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "setting MACOSX_DEPLOYMENT_TARGET from the product version of OS X" {
|
||||||
|
stub uname '-s : echo Darwin'
|
||||||
|
stub sw_vers '-productVersion : echo 10.9.4'
|
||||||
|
|
||||||
|
run_inline_definition <<DEF
|
||||||
|
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
|
||||||
|
DEF
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
assert_build_log <<OUT
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=10.9
|
||||||
|
OUT
|
||||||
|
|
||||||
|
unstub uname
|
||||||
|
unstub sw_vers
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "not setting MACOSX_DEPLOYMENT_TARGET if the product version of OS X is not available" {
|
||||||
|
stub uname '-s : echo Darwin'
|
||||||
|
stub sw_vers false
|
||||||
|
|
||||||
|
run_inline_definition <<DEF
|
||||||
|
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
|
||||||
|
DEF
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
assert_build_log <<OUT
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=
|
||||||
|
OUT
|
||||||
|
|
||||||
|
unstub uname
|
||||||
|
unstub sw_vers
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ load test_helper
|
|||||||
@test "blank invocation" {
|
@test "blank invocation" {
|
||||||
run pyenv
|
run pyenv
|
||||||
assert_success
|
assert_success
|
||||||
assert [ "${lines[0]}" == "pyenv 20140705" ]
|
assert [ "${lines[0]}" == "pyenv 20140825" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "invalid command" {
|
@test "invalid command" {
|
||||||
|
|||||||
Reference in New Issue
Block a user