mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 14:53:53 -05:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f32e96c28 | ||
|
|
294738842c | ||
|
|
a3bea25ddc | ||
|
|
1a66a9141b | ||
|
|
78c1d7186d | ||
|
|
9b60d73ec8 | ||
|
|
8a9d2557a0 | ||
|
|
2a79db00b0 | ||
|
|
3e7839c5b7 | ||
|
|
36c5cbf74f | ||
|
|
608ad6f9d0 | ||
|
|
7a6eb38a36 | ||
|
|
cd40335ba4 | ||
|
|
26450fd0ab | ||
|
|
22ecefd572 | ||
|
|
abae52ae20 | ||
|
|
114063495f | ||
|
|
7b797c3797 | ||
|
|
8e276a009e | ||
|
|
4198280142 | ||
|
|
5cb9c9af2e | ||
|
|
d6230578ec | ||
|
|
62bf3d9b61 | ||
|
|
55e6e7143a | ||
|
|
1e78acb701 | ||
|
|
648afe05a9 | ||
|
|
9aee57d965 | ||
|
|
ed684c239c | ||
|
|
fe934642c5 | ||
|
|
7c4c1757f7 |
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,5 +1,24 @@
|
||||
## Version History
|
||||
|
||||
#### 20150719
|
||||
|
||||
* python-build: Add CPython `3.6-dev` (#413)
|
||||
* python-build: Add Anaconda/Anaconda3 2.3.0
|
||||
* python-build: Fix download URL of portable PyPy 2.6 (fixes #389)
|
||||
* python-build: Use custom `MACOSX_DEPLOYMENT_TARGET` if defined (#312)
|
||||
* python-build: Use original CPython repository instead of mirror at bitbucket.org as the source of `*-dev` versions (#409)
|
||||
* python-build: Pin pip version to 1.5.6 for python 3.1.5 (#351)
|
||||
|
||||
#### 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)
|
||||
|
||||
@@ -126,7 +126,7 @@ reading it from the following sources, in this order:
|
||||
Python. (In other words, whatever version would run if pyenv weren't in your
|
||||
`PATH`.)
|
||||
|
||||
**NOTE:** You can activate multiple versions at the same time, including mulitple
|
||||
**NOTE:** You can activate multiple versions at the same time, including multiple
|
||||
versions of Python2 or Python3 simultaneously. This allows for parallel usage of
|
||||
Python2 and Python3, and is required with tools like `tox`. For example, to set
|
||||
your path to first use your `system` Python and Python3 (set to 2.7.9 and 3.4.2
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="20150524"
|
||||
version="20150719"
|
||||
|
||||
if cd "$PYENV_ROOT" 2>/dev/null; then
|
||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||
|
||||
@@ -30,7 +30,7 @@ OLDIFS="$IFS"
|
||||
{ IFS=:
|
||||
for version in ${PYENV_VERSION}; do
|
||||
if [ "$version" = "system" ]; then
|
||||
if PYTHON_PATH="$(pyenv-which python 2>/dev/null)"; then
|
||||
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python 2>/dev/null)"; then
|
||||
PYENV_PREFIX_PATH="${PYTHON_PATH%/bin/*}"
|
||||
else
|
||||
echo "pyenv: system version not found in PATH" >&2
|
||||
|
||||
@@ -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() {
|
||||
@@ -982,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
|
||||
@@ -999,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
|
||||
@@ -1117,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
|
||||
@@ -1490,6 +1517,11 @@ build_package_verify_py35() {
|
||||
build_package_verify_py34 "$1" "${2:-3.5}"
|
||||
}
|
||||
|
||||
# Post-install check for Python 3.6.x
|
||||
build_package_verify_py36() {
|
||||
build_package_verify_py35 "$1" "${2:-3.6}"
|
||||
}
|
||||
|
||||
build_package_ez_setup() {
|
||||
local ez_setup="${BUILD_PATH}/ez_setup.py"
|
||||
rm -f "${ez_setup}"
|
||||
@@ -1528,12 +1560,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() {
|
||||
@@ -1568,6 +1600,8 @@ unset VERBOSE
|
||||
unset KEEP_BUILD_PATH
|
||||
unset HAS_PATCH
|
||||
unset DEBUG
|
||||
unset IPV4
|
||||
unset IPV6
|
||||
|
||||
PYTHON_BUILD_INSTALL_PREFIX="$(abs_dirname "$0")/.."
|
||||
|
||||
@@ -1600,6 +1634,12 @@ for option in "${OPTIONS[@]}"; do
|
||||
"g" | "debug" )
|
||||
DEBUG=true
|
||||
;;
|
||||
"4" | "ipv4")
|
||||
IPV4=true
|
||||
;;
|
||||
"6" | "ipv6")
|
||||
IPV6=true
|
||||
;;
|
||||
"version" )
|
||||
version
|
||||
exit 0
|
||||
@@ -1780,10 +1820,12 @@ 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]}"
|
||||
if [ -z "${MACOSX_DEPLOYMENT_TARGET}" ]; 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
|
||||
fi
|
||||
|
||||
|
||||
@@ -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_hg "Python-2.7-dev" "https://bitbucket.org/mirror/cpython" "2.7" standard verify_py27 ensurepip
|
||||
install_hg "Python-2.7-dev" "https://hg.python.org/cpython" "2.7" standard verify_py27 ensurepip
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#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.1.5" "http://python.org/ftp/python/3.1.5/Python-3.1.5.tgz#d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103" ldflags_dirs standard verify_py31 ensurepip
|
||||
install_package "Python-3.1.5" "http://python.org/ftp/python/3.1.5/Python-3.1.5.tgz#d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103" ldflags_dirs standard verify_py31 ez_setup
|
||||
install_package "pip-1.5.6" "https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#b1a4ae66baf21b7eb05a5e4f37c50c2706fa28ea1f8780ce8efe14dcd9f1726c" python
|
||||
|
||||
@@ -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_hg "Python-3.2-dev" "https://bitbucket.org/mirror/cpython" "3.2" standard verify_py32 ensurepip
|
||||
install_hg "Python-3.2-dev" "https://hg.python.org/cpython" "3.2" standard verify_py32 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_hg "Python-3.3-dev" "https://bitbucket.org/mirror/cpython" "3.3" standard verify_py33 ensurepip
|
||||
install_hg "Python-3.3-dev" "https://hg.python.org/cpython" "3.3" standard verify_py33 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_hg "Python-3.4-dev" "https://bitbucket.org/mirror/cpython" "3.4" standard verify_py34 ensurepip
|
||||
install_hg "Python-3.4-dev" "https://hg.python.org/cpython" "3.4" standard verify_py34 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_hg "Python-3.5-dev" "https://bitbucket.org/mirror/cpython" "default" standard verify_py35 ensurepip
|
||||
install_hg "Python-3.5-dev" "https://hg.python.org/cpython" "3.5" standard verify_py35 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.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-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.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.0b2" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b2.tgz#3487dbdea5b78ec25be73321e5d54f56d76e8de22bf818e2a529eeb9feb34fe8" 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.0b3" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b3.tgz#5d1437676e75826963028eece5e84c31a8f6e4a781b86d860df89607ddb62f29" 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_hg "Python-3.1-dev" "https://bitbucket.org/mirror/cpython" "3.1" standard verify_py31 ensurepip
|
||||
install_hg "Python-3.6-dev" "https://hg.python.org/cpython" "default" standard verify_py36 ensurepip
|
||||
19
plugins/python-build/share/python-build/anaconda-2.3.0
Normal file
19
plugins/python-build/share/python-build/anaconda-2.3.0
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Anaconda-2.3.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86.sh#73fdbbb3e38207ed18e5059f71676d18d48fdccbc455a1272eb45a60376cd818" "anaconda" verify_py27
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Anaconda-2.3.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86_64.sh#7c02499e9511c127d225992cfe1cd815e88fd46cd8a5b3cdf764f3fb4d8d4576" "anaconda" verify_py27
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Anaconda-2.3.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda-2.3.0-MacOSX-x86_64.sh#c4bb59a57bf44dde80612041bbbcfd2e5cab8534842209ef456da7a46f919c33" "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.3.0
Normal file
19
plugins/python-build/share/python-build/anaconda3-2.3.0
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86" )
|
||||
install_script "Anaconda3-2.3.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.3.0-Linux-x86.sh#4cc10d65c303191004ada2b6d75562c8ed84e42bf9871af06440dd956077b555" "anaconda" verify_py34
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Anaconda3-2.3.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.3.0-Linux-x86_64.sh#3be5410b2d9db45882c7de07c554cf4f1034becc274ec9074b23fd37a5c87a6f" "anaconda" verify_py34
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Anaconda3-2.3.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.3.0-MacOSX-x86_64.sh#6a0c94a49f41f9fda0138c8e966bd7b0a8965d6648fd21ffbd645d1453848ba5" "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
|
||||
@@ -0,0 +1,13 @@
|
||||
Only in .: 003_system_library_path_in_sys_path.patch
|
||||
diff -ur ../Python-2.7.10/Lib/site.py ./Lib/site.py
|
||||
--- ../Python-2.7.10/Lib/site.py 2014-06-30 05:05:30.000000000 +0300
|
||||
+++ ./Lib/site.py 2014-12-12 11:42:33.000000000 +0200
|
||||
@@ -300,7 +300,7 @@
|
||||
# locations.
|
||||
from sysconfig import get_config_var
|
||||
framework = get_config_var("PYTHONFRAMEWORK")
|
||||
- if framework:
|
||||
+ if False and framework:
|
||||
sitepackages.append(
|
||||
os.path.join("/Library", framework,
|
||||
sys.version[:3], "site-packages"))
|
||||
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-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6-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-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
|
||||
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
|
||||
|
||||
@@ -87,6 +87,10 @@ install_tmp_fixture() {
|
||||
run python-build $args "$TMP_FIXTURES/$name" "$destination"
|
||||
}
|
||||
|
||||
resolve_link() {
|
||||
$(type -p greadlink readlink | head -1) "$1"
|
||||
}
|
||||
|
||||
@test "apply built-in python patch before building" {
|
||||
cached_tarball "Python-3.2.1"
|
||||
|
||||
@@ -159,3 +163,120 @@ 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
|
||||
}
|
||||
|
||||
@test "python3-config" {
|
||||
mkdir -p "${INSTALL_ROOT}/bin"
|
||||
touch "${INSTALL_ROOT}/bin/python3"
|
||||
chmod +x "${INSTALL_ROOT}/bin/python3"
|
||||
touch "${INSTALL_ROOT}/bin/python3.4"
|
||||
chmod +x "${INSTALL_ROOT}/bin/python3.4"
|
||||
touch "${INSTALL_ROOT}/bin/python3-config"
|
||||
chmod +x "${INSTALL_ROOT}/bin/python3-config"
|
||||
touch "${INSTALL_ROOT}/bin/python3.4-config"
|
||||
chmod +x "${INSTALL_ROOT}/bin/python3.4-config"
|
||||
|
||||
TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
verify_python python3.4
|
||||
OUT
|
||||
assert_success
|
||||
|
||||
[ -L "${INSTALL_ROOT}/bin/python" ]
|
||||
[ -L "${INSTALL_ROOT}/bin/python-config" ]
|
||||
[[ "$(resolve_link "${INSTALL_ROOT}/bin/python")" == "python3.4" ]]
|
||||
[[ "$(resolve_link "${INSTALL_ROOT}/bin/python-config")" == "python3.4-config" ]]
|
||||
}
|
||||
|
||||
@test "--enable-framework" {
|
||||
mkdir -p "${INSTALL_ROOT}/Python.framework/Versions/Current/bin"
|
||||
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3"
|
||||
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3"
|
||||
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4"
|
||||
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4"
|
||||
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3-config"
|
||||
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3-config"
|
||||
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
|
||||
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
verify_python python3.4
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-framework=${TMP}/install)
|
||||
EOS
|
||||
|
||||
[ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python" ]
|
||||
[ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python-config" ]
|
||||
}
|
||||
|
||||
@test "--enable-universalsdk" {
|
||||
stub uname '-s : echo Darwin'
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-universalsdk=/ --with-universal-archs=intel)
|
||||
EOS
|
||||
}
|
||||
|
||||
@test "default MACOSX_DEPLOYMENT_TARGET" {
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
|
||||
TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
echo "\${MACOSX_DEPLOYMENT_TARGET}"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output "10.10"
|
||||
}
|
||||
|
||||
@test "use custom MACOSX_DEPLOYMENT_TARGET if defined" {
|
||||
stub uname '-s : echo Darwin'
|
||||
|
||||
MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
echo "\${MACOSX_DEPLOYMENT_TARGET}"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output "10.4"
|
||||
}
|
||||
|
||||
@@ -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 20150524" ]
|
||||
assert [ "${lines[0]}" == "pyenv 20150719" ]
|
||||
}
|
||||
|
||||
@test "invalid command" {
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "prefixes" {
|
||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
||||
touch "${PYENV_TEST_DIR}/bin/python"
|
||||
chmod +x "${PYENV_TEST_DIR}/bin/python"
|
||||
mkdir -p "${PYENV_ROOT}/versions/2.7.10"
|
||||
PYENV_VERSION="system:2.7.10" run pyenv-prefix
|
||||
assert_success "${PYENV_TEST_DIR}:${PYENV_ROOT}/versions/2.7.10"
|
||||
PYENV_VERSION="2.7.10:system" run pyenv-prefix
|
||||
assert_success "${PYENV_ROOT}/versions/2.7.10:${PYENV_TEST_DIR}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user