mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 23:03:53 -05:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cb9c9af2e | ||
|
|
d6230578ec | ||
|
|
62bf3d9b61 | ||
|
|
55e6e7143a | ||
|
|
1e78acb701 | ||
|
|
648afe05a9 | ||
|
|
9aee57d965 | ||
|
|
ed684c239c | ||
|
|
fe934642c5 | ||
|
|
7c4c1757f7 | ||
|
|
1b066598ce | ||
|
|
cc94ad39f1 | ||
|
|
c754efc44b | ||
|
|
46ffb0c8df | ||
|
|
70cce28ba3 | ||
|
|
9156191168 | ||
|
|
5402ce423b | ||
|
|
2ea2e7558d | ||
|
|
9d8da866f1 | ||
|
|
70fa356585 | ||
|
|
31fb290de2 | ||
|
|
e285f2e5b1 | ||
|
|
1d31529b46 | ||
|
|
481198d255 | ||
|
|
e8433cfeb3 | ||
|
|
7f88eabd0b |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,5 +1,29 @@
|
||||
## Version History
|
||||
|
||||
#### 20150601
|
||||
|
||||
* python-build: Add PyPy 2.6.0
|
||||
* python-build: Add PyPy 2.5.1 portable
|
||||
* python-build: Add CPython 3.5.0 beta releases; 3.5.0b1 and 3.5.0b2
|
||||
* python-build: Removed CPython 3.5.0 alpha releases
|
||||
* python-build: Fix inverted condition for `--altinstall` of ensurepip (#255)
|
||||
* python-build: Skip installing `setuptools` by `ez_setup.py` explicitly (fixes #381)
|
||||
* python-build: Import changes from ruby-build v20150519
|
||||
|
||||
#### 20150524
|
||||
|
||||
* pyenv: Improve `pyenv version`, if there is one missing (#290)
|
||||
* pyenv: Improve pip-rehash to handle versions in command, like `pip2` and `pip3.4` (#368)
|
||||
* python-build: Add CPython release; 2.7.10 (#380)
|
||||
* python-build: Add Miniconda/Miniconda3 3.9.1 and Anaconda/Anaconda3 2.2.0 (#375, #376)
|
||||
|
||||
#### 20150504
|
||||
|
||||
* python-build: Add Jython 2.7.0
|
||||
* python-build: Add CPython alpha release; 3.5.0a4
|
||||
* python-build: Add CPython 3.1, 3.1.1, and 3.1.2
|
||||
* python-build: Fix pip version to 1.5.6 for CPython 3.1.x (#351)
|
||||
|
||||
#### 20150326
|
||||
|
||||
* python-build: Add Portable PyPy binaries from https://github.com/squeaky-pl/portable-pypy (#329)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="20150326"
|
||||
version="20150601"
|
||||
|
||||
if cd "$PYENV_ROOT" 2>/dev/null; then
|
||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||
|
||||
@@ -8,10 +8,13 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
exitcode=0
|
||||
OLDIFS="$IFS"
|
||||
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
|
||||
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name)) || exitcode=$?
|
||||
IFS="$OLDIFS"
|
||||
|
||||
for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
|
||||
echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
|
||||
done
|
||||
|
||||
exit $exitcode
|
||||
|
||||
@@ -9,7 +9,7 @@ if [ -e "$VERSION_FILE" ]; then
|
||||
# Read the first non-whitespace word from the specified version file.
|
||||
# Be careful not to load it whole in case there's something crazy in it.
|
||||
IFS="${IFS}"$'\r'
|
||||
words=( $(cut -b 1-1024 "$VERSION_FILE" | $(type -p gawk awk | head -1) '{ print($1) }') )
|
||||
words=($(cut -b 1-1024 "$VERSION_FILE" | sed 's/^\s*\(\S\+\).*/\1/'))
|
||||
versions=("${words[@]}")
|
||||
|
||||
if [ -n "$versions" ]; then
|
||||
|
||||
@@ -21,6 +21,7 @@ version_exists() {
|
||||
versions=()
|
||||
OLDIFS="$IFS"
|
||||
{ IFS=:
|
||||
any_not_installed=0
|
||||
for version in ${PYENV_VERSION}; do
|
||||
if version_exists "$version" || [ "$version" = "system" ]; then
|
||||
versions=("${versions[@]}" "${version}")
|
||||
@@ -28,7 +29,7 @@ OLDIFS="$IFS"
|
||||
versions=("${versions[@]}" "${version#python-}")
|
||||
else
|
||||
echo "pyenv: version \`$version' is not installed" >&2
|
||||
exit 1
|
||||
any_not_installed=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -39,3 +40,7 @@ OLDIFS="$IFS"
|
||||
echo "${versions[*]}"
|
||||
}
|
||||
IFS="$OLDIFS"
|
||||
|
||||
if [ "$any_not_installed" = 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -101,7 +101,7 @@ for option in "${OPTIONS[@]}"; do
|
||||
exec python-build --version
|
||||
;;
|
||||
* )
|
||||
usage 1
|
||||
usage 1 >&2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -246,7 +246,7 @@ if [ "$STATUS" == "2" ]; then
|
||||
echo " brew update && brew upgrade pyenv"
|
||||
elif [ -d "${here}/.git" ]; then
|
||||
printf ":\n\n"
|
||||
echo " cd ${here} && git pull"
|
||||
echo " cd ${here} && git pull && cd -"
|
||||
else
|
||||
printf ".\n"
|
||||
fi
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
# -k/--keep Do not remove source tree after installation
|
||||
# -v/--verbose Verbose mode: print compilation status to stdout
|
||||
# -p/--patch Apply a patch from stdin before building
|
||||
# -4/--ipv4 Resolve names to IPv4 addresses only
|
||||
# -6/--ipv6 Resolve names to IPv6 addresses only
|
||||
# --definitions List all built-in definitions
|
||||
# -g/--debug Build a debug version
|
||||
#
|
||||
|
||||
PYTHON_BUILD_VERSION="20141028"
|
||||
PYTHON_BUILD_VERSION="20150519"
|
||||
|
||||
set -E
|
||||
exec 3<&2 # preserve original stderr at fd 3
|
||||
@@ -231,7 +233,7 @@ compute_sha2() {
|
||||
output="$(shasum -a 256 -b)" || return 1
|
||||
echo "${output% *}"
|
||||
elif type openssl &>/dev/null; then
|
||||
local openssl="$(command -v "$(brew --prefix openssl 2>/dev/null)"/bin/openssl openssl | head -1)"
|
||||
local openssl="$(command -v "$(brew --prefix openssl 2>/dev/null || true)"/bin/openssl openssl | head -1)"
|
||||
output="$("$openssl" dgst -sha256 2>/dev/null)" || return 1
|
||||
echo "${output##* }"
|
||||
elif type sha256sum &>/dev/null; then
|
||||
@@ -307,19 +309,31 @@ http() {
|
||||
}
|
||||
|
||||
http_head_curl() {
|
||||
curl -qsILf "$1" >&4 2>&1
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--ipv4"
|
||||
[ -n "${IPV6}" ] && options="--ipv6"
|
||||
curl -qsILf ${options} "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_curl() {
|
||||
curl -q -o "${2:--}" -sSLf "$1"
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--ipv4"
|
||||
[ -n "${IPV6}" ] && options="--ipv6"
|
||||
curl -q -o "${2:--}" -sSLf ${options} "$1"
|
||||
}
|
||||
|
||||
http_head_wget() {
|
||||
wget -q --spider "$1" >&4 2>&1
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--inet4-only"
|
||||
[ -n "${IPV6}" ] && options="--inet6-only"
|
||||
wget -q --spider ${options} "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_wget() {
|
||||
wget -nv -O "${2:--}" "$1"
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--inet4-only"
|
||||
[ -n "${IPV6}" ] && options="--inet6-only"
|
||||
wget -nv ${options} -O "${2:--}" "$1"
|
||||
}
|
||||
|
||||
fetch_tarball() {
|
||||
@@ -534,7 +548,9 @@ fetch_jar() {
|
||||
download_tarball "$package_url" "$package_filename" "$checksum"
|
||||
fi
|
||||
|
||||
{ if $JAVA -jar ${package_name}.jar -s -d ${package_name}; then
|
||||
# Must use full path to jar and destination directory:
|
||||
# http://bugs.jython.org/issue2350
|
||||
{ if $JAVA -jar $PWD/${package_name}.jar -s -d $PWD/${package_name}; then
|
||||
if [ -z "$KEEP_BUILD_PATH" ]; then
|
||||
rm -f "$package_filename"
|
||||
else
|
||||
@@ -980,7 +996,7 @@ fix_rbx_gem_binstubs() {
|
||||
binstub="${bindir}/${file##*/}"
|
||||
rm -f "$binstub"
|
||||
{ echo "#!${bindir}/ruby"
|
||||
cat "$file"
|
||||
grep -v '^#!' "$file"
|
||||
} > "$binstub"
|
||||
chmod +x "$binstub"
|
||||
done
|
||||
@@ -997,7 +1013,7 @@ fix_rbx_irb() {
|
||||
}
|
||||
|
||||
require_java7() {
|
||||
local version="$(java -version 2>&1 | head -1)"
|
||||
local version="$(java -version 2>&1 | grep '\(java\|openjdk\) version' | head -1)"
|
||||
if [[ $version != *1.[789]* ]]; then
|
||||
colorize 1 "ERROR" >&3
|
||||
echo ": Java 7 required. Please install a 1.7-compatible JRE." >&3
|
||||
@@ -1115,6 +1131,19 @@ require_llvm() {
|
||||
local llvm_config="${llvm_prefix}/bin/llvm-config"
|
||||
if [ -x "$llvm_config" ]; then
|
||||
package_option python configure --llvm-config="$llvm_config"
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": Rubinius will not be able to compile using Apple's LLVM-based "
|
||||
echo "build tools on OS X. You will need to install LLVM 3.5 first."
|
||||
echo
|
||||
colorize 1 "TO FIX THE PROBLEM"
|
||||
echo ": Install Homebrew's llvm package with this"
|
||||
echo -n "command: "
|
||||
colorize 4 "brew install llvm"
|
||||
echo
|
||||
} >&3
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -1526,12 +1555,12 @@ build_package_get_pip() {
|
||||
|
||||
build_package_ensurepip() {
|
||||
local ensurepip_opts
|
||||
if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then
|
||||
# Install as `--altinstall` if the Python is installed as `altinstall` (#255)
|
||||
if [[ "$PYTHON_MAKE_INSTALL_TARGET" == *"altinstall"* ]]; then
|
||||
ensurepip_opts="--altinstall"
|
||||
fi
|
||||
"$PYTHON_BIN" -m ensurepip $ensurepip_opts 1>/dev/null 2>&1 || {
|
||||
build_package_ez_setup "$@" && build_package_get_pip "$@"
|
||||
} || return 1
|
||||
# FIXME: `--altinstall` with `get-pip.py`
|
||||
"$PYTHON_BIN" -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
||||
}
|
||||
|
||||
version() {
|
||||
@@ -1566,6 +1595,8 @@ unset VERBOSE
|
||||
unset KEEP_BUILD_PATH
|
||||
unset HAS_PATCH
|
||||
unset DEBUG
|
||||
unset IPV4
|
||||
unset IPV6
|
||||
|
||||
PYTHON_BUILD_INSTALL_PREFIX="$(abs_dirname "$0")/.."
|
||||
|
||||
@@ -1598,6 +1629,12 @@ for option in "${OPTIONS[@]}"; do
|
||||
"g" | "debug" )
|
||||
DEBUG=true
|
||||
;;
|
||||
"4" | "ipv4")
|
||||
IPV4=true
|
||||
;;
|
||||
"6" | "ipv6")
|
||||
IPV6=true
|
||||
;;
|
||||
"version" )
|
||||
version
|
||||
exit 0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#require_gcc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.5.0a1" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0a1.tgz#f1ea32ce88ffff8787ea31302e00b05a" ldflags_dirs standard verify_py35 ensurepip
|
||||
install_package "Python-2.7.10" "https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz#eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a" ldflags_dirs standard verify_py27 ensurepip
|
||||
@@ -1,3 +0,0 @@
|
||||
#require_gcc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.5.0a4" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0a4.tgz#34667f07604352a4a1ef4651dcb7f870" ldflags_dirs standard verify_py35 ensurepip
|
||||
@@ -1,3 +1,3 @@
|
||||
#require_gcc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.5.0a2" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0a2.tgz#8e72209d95f286efb33bf96a6593d475" ldflags_dirs standard verify_py35 ensurepip
|
||||
install_package "Python-3.5.0b1" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b1.tgz#1a4f57ad2ec0dd9b17703e13b46b96256b55b28d9e6529005e72f3d660e3f8a1" ldflags_dirs standard verify_py35 ensurepip
|
||||
@@ -1,3 +1,3 @@
|
||||
#require_gcc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.5.0a3" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0a3.tgz#5521bdf9ae9af5b794cd65477bcb02a3" ldflags_dirs standard verify_py35 ensurepip
|
||||
install_package "Python-3.5.0b2" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b2.tgz#3487dbdea5b78ec25be73321e5d54f56d76e8de22bf818e2a529eeb9feb34fe8" ldflags_dirs standard verify_py35 ensurepip
|
||||
19
plugins/python-build/share/python-build/anaconda-2.2.0
Normal file
19
plugins/python-build/share/python-build/anaconda-2.2.0
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Anaconda-2.2.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda-2.2.0-Linux-x86.sh#6437d5b08a19c3501f2f5dc3ae1ae16f91adf6bed0f067ef0806a9911b1bef15" "anaconda" verify_py27
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Anaconda-2.2.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda-2.2.0-Linux-x86_64.sh#ca2582cb2188073b0f348ad42207211a2b85c10b244265b5b27bab04481b88a2" "anaconda" verify_py27
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Anaconda-2.2.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda-2.2.0-MacOSX-x86_64.sh#20570e2f3911e38a78d8f888f3ff445d6c0cf97a2fca40d6956b48d12aaef339" "anaconda" verify_py27
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Anaconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
19
plugins/python-build/share/python-build/anaconda3-2.2.0
Normal file
19
plugins/python-build/share/python-build/anaconda3-2.2.0
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Anaconda3-2.2.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.2.0-Linux-x86.sh#223655cd256aa912dfc83ab24570e47bb3808bc3b0c6bd21b5db0fcf2750883e" "anaconda" verify_py34
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Anaconda3-2.2.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.2.0-Linux-x86_64.sh#4aac68743e7706adb93f042f970373a6e7e087dbf4b02ac467c94ca4ce33d2d1" "anaconda" verify_py34
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Anaconda3-2.2.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.2.0-MacOSX-x86_64.sh#81a2089ea6127717f146454e99ea0be2bd595193e4151bb05b4c15749b1d8124" "anaconda" verify_py34
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Anaconda3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -1,15 +1,6 @@
|
||||
require_java
|
||||
install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython
|
||||
|
||||
# Jython is supposed to install pip using ensurepip by default, but this does
|
||||
# not appear to be working so we do it manually.
|
||||
#
|
||||
# pyenv's `ensurepip` downloads `get-pip.py` which isnt currently compatible
|
||||
# with jython: http://bugs.jython.org/issue2302
|
||||
#
|
||||
# Use the ensurepip module in jython to install the bundled pip instead:
|
||||
"$PYTHON_BIN" -m ensurepip
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"osx64"|"win32" )
|
||||
# Jython does not seem to work properly on OSX/windows unless JAVA_HOME is set
|
||||
|
||||
19
plugins/python-build/share/python-build/miniconda-3.9.1
Normal file
19
plugins/python-build/share/python-build/miniconda-3.9.1
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Miniconda-3.9.1-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda-3.9.1-Linux-x86.sh#f3cdc8d774acce05462eb07d2676162c519e1e5d35c98d1dc3d6eb7b262da0b2" "miniconda" verify_py27
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda-3.9.1-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.9.1-Linux-x86_64.sh#64f2b5047f944bb9b06e46c7281e9edffd412981c93e31d4c111287a1d30fef4" "miniconda" verify_py27
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda-3.9.1-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.9.1-MacOSX-x86_64.sh#ea529626cfb3519eebee83c40965f0a58375e0826c6777b759eb0c42ca9970d2" "miniconda" verify_py27
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
19
plugins/python-build/share/python-build/miniconda3-3.9.1
Normal file
19
plugins/python-build/share/python-build/miniconda3-3.9.1
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Miniconda3-3.9.1-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda3-3.9.1-Linux-x86.sh#1a9f8abfc63080c2d764039335a24465388533cca86472224c994ed8d32c4d48" "miniconda" verify_py34
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-3.9.1-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.9.1-Linux-x86_64.sh#6c6b44acdd0bc4229377ee10d52c8ac6160c336d9cdd669db7371aa9344e1ac3" "miniconda" verify_py34
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-3.9.1-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.9.1-MacOSX-x86_64.sh#e32523e3fdf0addab008e816c54eb6ae6eb6d62b1122d1e0dc4f4313a97b0591" "miniconda" verify_py34
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
44
plugins/python-build/share/python-build/pypy-2.6.0
Normal file
44
plugins/python-build/share/python-build/pypy-2.6.0
Normal file
@@ -0,0 +1,44 @@
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
if require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" 1>/dev/null 2>&1; then
|
||||
install_package "pypy-2.6.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux.tar.bz2#6e0b052c40a59bf5a85ee239980bbcab8b031b4c2bc33b99efe1b072977d9910" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
install_package "pypy-2.6.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.0-linux_i686-portable.tar.bz2#e01db0984f7fecd80dadfb1d5f65118e596e3984d12643b4d552e83f92bff549" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
||||
install_package "pypy-2.6.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux-armel.tar.bz2#9d0cb9b15283f9c15f83c05293f8bd41d302c96090fd89b778f359df9bc8e619" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy-2.6.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux-armhf-raspbian.tar.bz2#e9f6a16c3e21f38bd571adb33757649ceef3f2ebfdd6d37eea923ce26ea6728c" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy-2.6.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux-armhf-raring.tar.bz2#ccb37a6d861b6dd69cd038337664885dcf91852a2ab6aef480dd7cfbda8de502" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux64" )
|
||||
if require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" 1>/dev/null 2>&1; then
|
||||
install_package "pypy-2.6.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux64.tar.bz2#f5d2b0e3594cec57e32d3e43a951041ec330e1e962a836be470d591633e51388" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
install_package "pypy-2.6.0-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.0-linux_x86_64-portable.tar.bz2#97284b66476c5d1b17a62f5017569a0073730928e19f95b49d78d6bc60b69495" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy-2.6.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-osx64.tar.bz2#77f1d056484e40e0a8e2e2b2b489eedfe785605ef36b144ffce05f7b748f6acd" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"win32" )
|
||||
# FIXME: never tested on Windows
|
||||
install_zip "pypy-2.6.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-win32.zip#de907e7fef7b9b6ceccfc8aa5f4781ee3bc4a49b119d4b22ab5e25eab21c6e8d" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy-2.6.0-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
2
plugins/python-build/share/python-build/pypy-2.6.0-src
Normal file
2
plugins/python-build/share/python-build/pypy-2.6.0-src
Normal file
@@ -0,0 +1,2 @@
|
||||
require_gcc
|
||||
install_package "pypy-2.6.0-src" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-src.tar.bz2#9bf353f22d25e97a85a6d3766619966055edea1ea1b2218445d683a8ad0399d9" "pypy_builder" verify_py27 ensurepip
|
||||
16
plugins/python-build/share/python-build/pypy-portable-2.5.1
Normal file
16
plugins/python-build/share/python-build/pypy-portable-2.5.1
Normal file
@@ -0,0 +1,16 @@
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy-2.5.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.5.1-linux_i686-portable.tar.bz2#ed532ddde3332d10faa59af49854cacbca458c597889352e619a87ab22363063" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy-2.5.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.5.1-linux_x86_64-portable.tar.bz2#157bee6349878cf0ef575b0d7bfd6cbb837c00e83b2872c924580ef7bc32c0d7" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": Portable PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
16
plugins/python-build/share/python-build/pypy-portable-2.6.0
Normal file
16
plugins/python-build/share/python-build/pypy-portable-2.6.0
Normal file
@@ -0,0 +1,16 @@
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy-2.6-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6-linux_i686-portable.tar.bz2#e01db0984f7fecd80dadfb1d5f65118e596e3984d12643b4d552e83f92bff549" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy-2.6-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6-linux_x86_64-portable.tar.bz2#97284b66476c5d1b17a62f5017569a0073730928e19f95b49d78d6bc60b69495" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": Portable PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -462,6 +462,14 @@ OUT
|
||||
# nop
|
||||
}
|
||||
|
||||
@test "Java version string not on first line" {
|
||||
# nop
|
||||
}
|
||||
|
||||
@test "Java version string on OpenJDK" {
|
||||
# nop
|
||||
}
|
||||
|
||||
@test "non-writable TMPDIR aborts build" {
|
||||
export TMPDIR="${TMP}/build"
|
||||
mkdir -p "$TMPDIR"
|
||||
|
||||
@@ -69,7 +69,7 @@ See all available versions with \`pyenv install --list'.
|
||||
|
||||
If the version you need is missing, try upgrading pyenv:
|
||||
|
||||
cd ${BATS_TEST_DIRNAME}/../../.. && git pull
|
||||
cd ${BATS_TEST_DIRNAME}/../../.. && git pull && cd -
|
||||
OUT
|
||||
|
||||
unstub python-build
|
||||
|
||||
@@ -159,3 +159,39 @@ OUT
|
||||
|
||||
unstub make
|
||||
}
|
||||
|
||||
@test "ensurepip without altinstall" {
|
||||
mkdir -p "${INSTALL_ROOT}/bin"
|
||||
cat <<OUT > "${INSTALL_ROOT}/bin/python"
|
||||
#!$BASH
|
||||
echo "python \$@" >> "${INSTALL_ROOT}/build.log"
|
||||
OUT
|
||||
chmod +x "${INSTALL_ROOT}/bin/python"
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
build_package_ensurepip
|
||||
OUT
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
python -m ensurepip
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "ensurepip with altinstall" {
|
||||
mkdir -p "${INSTALL_ROOT}/bin"
|
||||
cat <<OUT > "${INSTALL_ROOT}/bin/python"
|
||||
#!$BASH
|
||||
echo "python \$@" >> "${INSTALL_ROOT}/build.log"
|
||||
OUT
|
||||
chmod +x "${INSTALL_ROOT}/bin/python"
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
build_package_ensurepip
|
||||
OUT
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
python -m ensurepip --altinstall
|
||||
OUT
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
PYENV_PIP_REHASH_ROOT="${BASH_SOURCE[0]%/*}/pip-rehash"
|
||||
if [ -x "${PYENV_PIP_REHASH_ROOT}/${PYENV_COMMAND##*/}" ]; then
|
||||
PYENV_COMMAND_PATH="${PYENV_PIP_REHASH_ROOT}/${PYENV_COMMAND##*/}"
|
||||
PYENV_BIN_PATH="${PYENV_PIP_REHASH_ROOT}"
|
||||
PYENV_REHASH_COMMAND="${PYENV_COMMAND##*/}"
|
||||
|
||||
# Remove any version information, from e.g. "pip2" or "pip3.4".
|
||||
if [[ $PYENV_REHASH_COMMAND =~ ^(pip|easy_install)[23](\.\d)?$ ]]; then
|
||||
PYENV_REHASH_COMMAND="${BASH_REMATCH[1]}"
|
||||
fi
|
||||
|
||||
if [ -x "${PYENV_PIP_REHASH_ROOT}/${PYENV_REHASH_COMMAND}" ]; then
|
||||
PYENV_COMMAND_PATH="${PYENV_PIP_REHASH_ROOT}/${PYENV_REHASH_COMMAND##*/}"
|
||||
PYENV_BIN_PATH="${PYENV_PIP_REHASH_ROOT}"
|
||||
export PYENV_REHASH_REAL_COMMAND="${PYENV_COMMAND##*/}"
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ _PATH="${_PATH#:}"
|
||||
_PATH="${_PATH%:}"
|
||||
PATH="${_PATH}"
|
||||
|
||||
PYENV_COMMAND_PATH="$(pyenv-which "$(basename "$0")")"
|
||||
PYENV_COMMAND_PATH="$(pyenv-which "${PYENV_REHASH_REAL_COMMAND}")"
|
||||
PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}"
|
||||
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
|
||||
@@ -11,7 +11,7 @@ _PATH="${_PATH#:}"
|
||||
_PATH="${_PATH%:}"
|
||||
PATH="${_PATH}"
|
||||
|
||||
PYENV_COMMAND_PATH="$(pyenv-which "$(basename "$0")")"
|
||||
PYENV_COMMAND_PATH="$(pyenv-which "${PYENV_REHASH_REAL_COMMAND}")"
|
||||
PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}"
|
||||
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
|
||||
@@ -71,11 +71,11 @@ load test_helper
|
||||
assert_line 0 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
|
||||
}
|
||||
|
||||
@test "doesn't add shims to PATH more than once (fish)" {
|
||||
@test "can add shims to PATH more than once (fish)" {
|
||||
export PATH="${PYENV_ROOT}/shims:$PATH"
|
||||
run pyenv-init - fish
|
||||
assert_success
|
||||
refute_line 'setenv PATH "'${PYENV_ROOT}'/shims" $PATH ;'
|
||||
assert_line 0 "setenv PATH '${PYENV_ROOT}/shims' \$PATH"
|
||||
}
|
||||
|
||||
@test "outputs sh-compatible syntax" {
|
||||
|
||||
@@ -5,7 +5,7 @@ load test_helper
|
||||
@test "blank invocation" {
|
||||
run pyenv
|
||||
assert_success
|
||||
assert [ "${lines[0]}" == "pyenv 20150326" ]
|
||||
assert [ "${lines[0]}" == "pyenv 20150601" ]
|
||||
}
|
||||
|
||||
@test "invalid command" {
|
||||
|
||||
@@ -52,6 +52,39 @@ setup() {
|
||||
assert_failure "pyenv: version \`1.2' is not installed"
|
||||
}
|
||||
|
||||
@test "one missing version (second missing)" {
|
||||
create_version "3.4.2"
|
||||
PYENV_VERSION="3.4.2:1.2" run pyenv-version-name
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
pyenv: version \`1.2' is not installed
|
||||
3.4.2
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "one missing version (first missing)" {
|
||||
create_version "3.4.2"
|
||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
pyenv: version \`1.2' is not installed
|
||||
3.4.2
|
||||
OUT
|
||||
}
|
||||
|
||||
pyenv-version-name-without-stderr() {
|
||||
pyenv-version-name 2>/dev/null
|
||||
}
|
||||
|
||||
@test "one missing version (without stderr)" {
|
||||
create_version "3.4.2"
|
||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name-without-stderr
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
3.4.2
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "version with prefix in name" {
|
||||
create_version "2.7.6"
|
||||
cat > ".python-version" <<<"python-2.7.6"
|
||||
|
||||
@@ -36,3 +36,37 @@ setup() {
|
||||
run pyenv-version
|
||||
assert_success "3.3.3 (set by ${PYENV_ROOT}/version)"
|
||||
}
|
||||
|
||||
@test "set by PYENV_VERSION, one missing" {
|
||||
create_version "3.3.3"
|
||||
PYENV_VERSION=3.3.3:1.2 run pyenv-version
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
pyenv: version \`1.2' is not installed
|
||||
3.3.3 (set by PYENV_VERSION environment variable)
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "set by PYENV_VERSION, two missing" {
|
||||
create_version "3.3.3"
|
||||
PYENV_VERSION=3.4.2:3.3.3:1.2 run pyenv-version
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
pyenv: version \`3.4.2' is not installed
|
||||
pyenv: version \`1.2' is not installed
|
||||
3.3.3 (set by PYENV_VERSION environment variable)
|
||||
OUT
|
||||
}
|
||||
|
||||
pyenv-version-without-stderr() {
|
||||
pyenv-version 2>/dev/null
|
||||
}
|
||||
|
||||
@test "set by PYENV_VERSION, one missing (stderr filtered)" {
|
||||
create_version "3.3.3"
|
||||
PYENV_VERSION=3.4.2:3.3.3 run pyenv-version-without-stderr
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
3.3.3 (set by PYENV_VERSION environment variable)
|
||||
OUT
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user