mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 22:33:52 -05:00
Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d709586ee | ||
|
|
962c7827fb | ||
|
|
e8c1f0dccf | ||
|
|
0e698ffc4c | ||
|
|
5298c4bd1b | ||
|
|
9cd200b98c | ||
|
|
efef9d8c5c | ||
|
|
5e7bd78766 | ||
|
|
4967a7f495 | ||
|
|
803697feb2 | ||
|
|
fcbb1a24fd | ||
|
|
f22d0e969b | ||
|
|
3d263c8fa3 | ||
|
|
ae40042ff8 | ||
|
|
8579fd4567 | ||
|
|
c4e012d5e3 | ||
|
|
f64f7c7c49 | ||
|
|
0dcce750b9 | ||
|
|
a300254841 | ||
|
|
57df303a2c | ||
|
|
aed0eaeceb | ||
|
|
bbe84d0411 | ||
|
|
2145efec42 | ||
|
|
cd3ace7d97 | ||
|
|
8781d132e7 | ||
|
|
f66b8ead99 | ||
|
|
8b414ce31d | ||
|
|
aa7b6420ce | ||
|
|
216244fbac | ||
|
|
4c654d703e | ||
|
|
02c7589d2a | ||
|
|
69d5656311 | ||
|
|
4d64f84a25 | ||
|
|
42cffbc82d | ||
|
|
c8c40cff21 | ||
|
|
10957b786a | ||
|
|
9e07319cf9 | ||
|
|
03f8029c41 | ||
|
|
5f20bc258f | ||
|
|
75fd97803d | ||
|
|
9993d13996 | ||
|
|
c71cf59f50 | ||
|
|
8ea88dee1c | ||
|
|
97da7c40e7 | ||
|
|
1921dbef18 | ||
|
|
0a73b8f886 | ||
|
|
4a8947d1a6 | ||
|
|
e748c14db8 | ||
|
|
cd3103340c | ||
|
|
4543ff88bc | ||
|
|
a0e0f1637a | ||
|
|
cd8f61b5e0 | ||
|
|
fbc40aae77 | ||
|
|
b116f341fe |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,6 +1,22 @@
|
||||
## Version History
|
||||
|
||||
## Unreleased
|
||||
## 20160629
|
||||
|
||||
* python-build: Added CPython 2.7.12 (#645)
|
||||
* python-build: Added PyPy 3.5.1 (#646)
|
||||
* python-build: Added PyPy Portable 5.3.1
|
||||
|
||||
## 20160628
|
||||
|
||||
* python-build: Added PyPy3.3 5.2-alpha1 (#631)
|
||||
* python-build: Added CPython 2.7.12rc1
|
||||
* python-build: Added CPython 3.6.0a2 (#630)
|
||||
* python-build: Added CPython 3.5.2 (#643)
|
||||
* python-build: Added CPython 3.4.5 (#643)
|
||||
* python-build: Added PyPy2 5.3 (#626)
|
||||
* pyenv: Skip creating shims for system executables bundled with Anaconda rather than ignoring them in `pyenv-which` (#594, #595, #599)
|
||||
* python-build: Configured GCC as a requirement to build CPython prior to 2.4.4 (#613)
|
||||
* python-build: Use `aria2c` - ultra fast download utility if available (#534)
|
||||
|
||||
## 20160509
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="20160509"
|
||||
version="20160629"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -70,7 +70,7 @@ if [ -z "$print" ]; then
|
||||
echo
|
||||
case "$shell" in
|
||||
fish )
|
||||
echo 'status --is-interactive; and . (pyenv init -|psub)'
|
||||
echo 'status --is-interactive; and source (pyenv init -|psub)'
|
||||
;;
|
||||
* )
|
||||
echo 'eval "$(pyenv init -)"'
|
||||
|
||||
@@ -323,42 +323,45 @@ http() {
|
||||
local file="$3"
|
||||
[ -n "$url" ] || return 1
|
||||
|
||||
if type curl &>/dev/null; then
|
||||
if type aria2c &>/dev/null; then
|
||||
"http_${method}_aria2c" "$url" "$file"
|
||||
elif type curl &>/dev/null; then
|
||||
"http_${method}_curl" "$url" "$file"
|
||||
elif type wget &>/dev/null; then
|
||||
"http_${method}_wget" "$url" "$file"
|
||||
else
|
||||
echo "error: please install \`curl\` or \`wget\` and try again" >&2
|
||||
echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
http_head_aria2c() {
|
||||
aria2c --dry-run --no-conf=true ${ARIA2_OPTS} "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_aria2c() {
|
||||
local out="${2:-$(mktemp "out.XXXXXX")}"
|
||||
if aria2c --allow-overwrite=true --no-conf=true -o "${out}" ${ARIA2_OPTS} "$1" >&4; then
|
||||
[ -n "$2" ] || cat "${out}"
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
http_head_curl() {
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--ipv4"
|
||||
[ -n "${IPV6}" ] && options="--ipv6"
|
||||
curl -qsILf ${options} "$1" >&4 2>&1
|
||||
curl -qsILf ${CURL_OPTS} "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_curl() {
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--ipv4"
|
||||
[ -n "${IPV6}" ] && options="--ipv6"
|
||||
curl -q -o "${2:--}" -sSLf ${options} "$1"
|
||||
curl -q -o "${2:--}" -sSLf ${CURL_OPTS} "$1"
|
||||
}
|
||||
|
||||
http_head_wget() {
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--inet4-only"
|
||||
[ -n "${IPV6}" ] && options="--inet6-only"
|
||||
wget -q --spider ${options} "$1" >&4 2>&1
|
||||
wget -q --spider ${WGET_OPTS} "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_wget() {
|
||||
options=""
|
||||
[ -n "${IPV4}" ] && options="--inet4-only"
|
||||
[ -n "${IPV6}" ] && options="--inet6-only"
|
||||
wget -nv ${options} -O "${2:--}" "$1"
|
||||
wget -nv ${WGET_OPTS} -O "${2:--}" "$1"
|
||||
}
|
||||
|
||||
fetch_tarball() {
|
||||
@@ -682,6 +685,26 @@ package_option() {
|
||||
eval "$variable=( \"\${value[@]}\" )"
|
||||
}
|
||||
|
||||
build_package_warn_eol() {
|
||||
local package_name="$1"
|
||||
|
||||
{ echo
|
||||
echo "WARNING: $package_name is past its end of life and is now unsupported."
|
||||
echo "It no longer receives bug fixes or critical security updates."
|
||||
echo
|
||||
} >&3
|
||||
}
|
||||
|
||||
build_package_warn_unsupported() {
|
||||
local package_name="$1"
|
||||
|
||||
{ echo
|
||||
echo "WARNING: $package_name is nearing its end of life."
|
||||
echo "It only receives critical security updates, no bug fixes."
|
||||
echo
|
||||
} >&3
|
||||
}
|
||||
|
||||
build_package_standard() {
|
||||
local package_name="$1"
|
||||
|
||||
@@ -1439,38 +1462,44 @@ apply_python_patch() {
|
||||
esac
|
||||
}
|
||||
|
||||
verify_python() {
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
build_package_symlink_version_suffix() {
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]] && [ ! -e "${PREFIX_PATH}/bin" ]; then
|
||||
# Only symlinks are installed in ${PREFIX_PATH}/bin
|
||||
rm -fr "${PREFIX_PATH}/bin"
|
||||
ln -fs "${PREFIX_PATH}/Python.framework/Versions/Current/bin" "${PREFIX_PATH}/bin"
|
||||
fi
|
||||
|
||||
# Not create symlinks on `altinstall` (#255)
|
||||
if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then
|
||||
local suffix="${1#python}"
|
||||
local file link
|
||||
shopt -s nullglob
|
||||
for file in "${PREFIX_PATH}/bin"/*; do
|
||||
unset link
|
||||
case "${file}" in
|
||||
*/"python${suffix}-config" )
|
||||
# Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (#296)
|
||||
link="${file%/*}/python-config"
|
||||
;;
|
||||
*/*"-${suffix}" )
|
||||
link="${file%%-${suffix}}"
|
||||
;;
|
||||
*/*"${suffix}" )
|
||||
link="${file%%${suffix}}"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$link" ] && [ ! -e "$link" ]; then
|
||||
( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" )
|
||||
fi
|
||||
done
|
||||
local version_bin="$(ls -1 "${PREFIX_PATH}/bin/python"* | grep '[0-9]$' | sort | tail -1)"
|
||||
suffix="$(basename "${version_bin}" | sed -e 's/^python//')"
|
||||
if [ -n "${suffix}" ]; then
|
||||
local file link
|
||||
for file in "${PREFIX_PATH}/bin"/*; do
|
||||
unset link
|
||||
case "${file}" in
|
||||
*/"python${suffix}-config" )
|
||||
# Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (#296)
|
||||
link="${file%/*}/python-config"
|
||||
;;
|
||||
*/*"-${suffix}" )
|
||||
link="${file%%-${suffix}}"
|
||||
;;
|
||||
*/*"${suffix}" )
|
||||
link="${file%%${suffix}}"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$link" ] && [ ! -e "$link" ]; then
|
||||
( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" )
|
||||
fi
|
||||
done
|
||||
fi
|
||||
shopt -u nullglob
|
||||
fi
|
||||
}
|
||||
|
||||
verify_python() {
|
||||
build_package_symlink_version_suffix
|
||||
|
||||
if [ ! -x "${PYTHON_BIN}" ]; then
|
||||
{ colorize 1 "ERROR"
|
||||
@@ -1605,7 +1634,7 @@ build_package_verify_py36() {
|
||||
}
|
||||
|
||||
build_package_ez_setup() {
|
||||
local ez_setup="${BUILD_PATH}/ez_setup.py"
|
||||
local ez_setup="ez_setup.py"
|
||||
rm -f "${ez_setup}"
|
||||
{ if [ "${EZ_SETUP+defined}" ] && [ -f "${EZ_SETUP}" ]; then
|
||||
echo "Installing setuptools from ${EZ_SETUP}..." 1>&2
|
||||
@@ -1620,10 +1649,11 @@ build_package_ez_setup() {
|
||||
echo "error: failed to install setuptools via ez_setup.py" >&2
|
||||
return 1
|
||||
}
|
||||
build_package_symlink_version_suffix
|
||||
}
|
||||
|
||||
build_package_get_pip() {
|
||||
local get_pip="${BUILD_PATH}/get-pip.py"
|
||||
local get_pip="get-pip.py"
|
||||
rm -f "${get_pip}"
|
||||
{ if [ "${GET_PIP+defined}" ] && [ -f "${GET_PIP}" ]; then
|
||||
echo "Installing pip from ${GET_PIP}..." 1>&2
|
||||
@@ -1638,6 +1668,7 @@ build_package_get_pip() {
|
||||
echo "error: failed to install pip via get-pip.py" >&2
|
||||
return 1
|
||||
}
|
||||
build_package_symlink_version_suffix
|
||||
}
|
||||
|
||||
build_package_ensurepip() {
|
||||
@@ -1648,6 +1679,7 @@ build_package_ensurepip() {
|
||||
fi
|
||||
# FIXME: `--altinstall` with `get-pip.py`
|
||||
"$PYTHON_BIN" -s -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
||||
build_package_symlink_version_suffix
|
||||
}
|
||||
|
||||
version() {
|
||||
@@ -1816,6 +1848,10 @@ if [ -n "$PYTHON_BUILD_SKIP_MIRROR" ] || ! has_checksum_support compute_sha2; th
|
||||
unset PYTHON_BUILD_MIRROR_URL
|
||||
fi
|
||||
|
||||
ARIA2_OPTS="${PYTHON_BUILD_ARIA2_OPTS} ${IPV4+--disable-ipv6=true} ${IPV6+--disable-ipv6=false}"
|
||||
CURL_OPTS="${PYTHON_BUILD_CURL_OPTS} ${IPV4+--ipv4} ${IPV6+--ipv6}"
|
||||
WGET_OPTS="${PYTHON_BUILD_WGET_OPTS} ${IPV4+--inet4-only} ${IPV6+--inet6-only}"
|
||||
|
||||
# Add an option to build a debug version of Python (#11)
|
||||
if [ -n "$DEBUG" ]; then
|
||||
package_option python configure --with-pydebug
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
require_gcc
|
||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||
install_package "Python-2.1.3" "http://www.python.org/ftp/python/2.1.3/Python-2.1.3.tgz#1bcb5bb587948bc38f36db60e15c376009c56c66570e563a08a82bf7f227afb9" ldflags_dirs standard verify_py21
|
||||
#install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#13951be6711438073fbe50843e7f141f" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
require_gcc
|
||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||
install_package "Python-2.2.3" "http://www.python.org/ftp/python/2.2.3/Python-2.2.3.tgz#a8f92e6b89d47359fff0d1fbfe47f104afc77fd1cd5143e7332758b7bc100188" ldflags_dirs standard verify_py22
|
||||
#install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#13951be6711438073fbe50843e7f141f" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
require_gcc
|
||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||
install_package "Python-2.3.7" "http://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz#969a9891dce9f50b13e54f9890acaf2be66715a5895bf9b11111f320c205b90e" ldflags_dirs standard verify_py23
|
||||
#install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#13951be6711438073fbe50843e7f141f" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4" "http://www.python.org/ftp/python/2.4/Python-2.4.tgz#ff746de0fae8691c082414b42a2bb172da8797e6e8ff66c9a39d2e452f7034e9" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.1" "http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz#f449c3b167389324c525ad99d02376c518ac11e163dbbbc13bc88a5c7101fd00" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.2" "http://www.python.org/ftp/python/2.4.2/Python-2.4.2.tgz#2653e1846e87fd9b3ee287fefc965c80c54646548b4913a22265b0dd54493adf" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.3" "http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz#985a413932f5e31e6280b37da6b285a3a0b2748c6786643989ed9b23de97e2d5" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.4" "http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tgz#92be6e20cbc3111d9dd0c016d72ef7914c23b879dc52df7ba28df97afbf12e2e" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.5" "http://www.python.org/ftp/python/2.4.5/Python-2.4.5.tgz#6ae6f67a388a7f70ed3a20eebab5aae995ee433089d1f1724095c62f4b7389a1" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
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-2.4.6" "http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz#b03f269e826927f05c966cf4f4414f3c93ee2314960859e7f8375e24e82f8b02" ldflags_dirs standard verify_py24
|
||||
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
|
||||
|
||||
4
plugins/python-build/share/python-build/2.7.12
Normal file
4
plugins/python-build/share/python-build/2.7.12
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
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-2.7.12" "https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz#3cb522d17463dfa69a155ab18cffa399b358c966c0363d6c8b5b3bf1384da4b6" ldflags_dirs standard verify_py27 ensurepip
|
||||
4
plugins/python-build/share/python-build/3.4.5
Normal file
4
plugins/python-build/share/python-build/3.4.5
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
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.4.5" "https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz#997aca4dd8692f3c954658a3db11c1d0862bcbf8eadd6a164746eb33d317c034" ldflags_dirs standard verify_py34 ensurepip
|
||||
4
plugins/python-build/share/python-build/3.5.2
Normal file
4
plugins/python-build/share/python-build/3.5.2
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
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.2" "https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz#1524b840e42cf3b909e8f8df67c1724012c7dc7f9d076d4feef2d3eff031e8a0" ldflags_dirs standard verify_py35 ensurepip
|
||||
4
plugins/python-build/share/python-build/3.6.0a1
Normal file
4
plugins/python-build/share/python-build/3.6.0a1
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
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.6.0a1" "https://www.python.org/ftp/python/3.6.0/Python-3.6.0a1.tgz#16336eefaec9adf2e8e0035ddb622076f78e0c9c49db1d962f018bfb3804935e" ldflags_dirs standard verify_py36 ensurepip
|
||||
4
plugins/python-build/share/python-build/3.6.0a2
Normal file
4
plugins/python-build/share/python-build/3.6.0a2
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
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.6.0a2" "https://www.python.org/ftp/python/3.6.0/Python-3.6.0a2.tgz#66600469e7938b6476e5caaa5a77eafe298877ad81896243970b724c1e6a0401" ldflags_dirs standard verify_py36 ensurepip
|
||||
56
plugins/python-build/share/python-build/pypy-5.3
Normal file
56
plugins/python-build/share/python-build/pypy-5.3
Normal file
@@ -0,0 +1,56 @@
|
||||
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 "pypy2-v5.3.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-linux32.tar.bz2#bd422fe9d0b7d525d1da3f32855b047bc39ba397d0cf708d8f4f96fe874424f2" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy-5.3-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy2-v5.3.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-linux-armel.tar.bz2#81b6f589a947d7353bb69408c46d4833d6e9cb501f3c3f0c73bd28d0e3df69aa" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy2-v5.3.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-linux-armhf-raspbian.tar.bz2#87b3566b6bbb8bf31c2f0d72bf31d95142fdce004d987812336a59d788005bed" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy2-v5.3.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-linux-armhf-raring.tar.bz2#bdb911a87e773a292334061b9c33b907f46d987e403fe94cc627a3b9b1c9cb19" "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 "pypy2-v5.3.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-linux64.tar.bz2#ac336e8877ed676bf87a9a546d5926b6afc4679fa2d3fdf9f3ca56f28ec40588" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy-5.3-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy2-v5.3.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-osx64.tar.bz2#1b103bacbdcdbbc490660ec0c7b3d99d1ff1cfc2f13cd403db21c27f03d36a1d" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"win32" )
|
||||
# FIXME: never tested on Windows
|
||||
install_zip "pypy2-v5.3.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-win32.zip#32a9e5286fc344165f63b529a9f84e521e9368e717c583488115654676428a20" "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-5.3-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
2
plugins/python-build/share/python-build/pypy-5.3-src
Normal file
2
plugins/python-build/share/python-build/pypy-5.3-src
Normal file
@@ -0,0 +1,2 @@
|
||||
require_gcc
|
||||
install_package "pypy2-v5.3.0-src" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.0-src.tar.bz2#4142eb8f403810bc88a4911792bb5a502e152df95806e33e69050c828cd160d5" "pypy_builder" verify_py27 ensurepip
|
||||
55
plugins/python-build/share/python-build/pypy-5.3.1
Normal file
55
plugins/python-build/share/python-build/pypy-5.3.1
Normal file
@@ -0,0 +1,55 @@
|
||||
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 "pypy2-v5.3.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux32.tar.bz2#da69f4280b288e524387103eaa3eb4d036965724c3e546da27135c15a77bd2eb" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
install_package "pypy-5.3.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.3.1-linux_i686-portable.tar.bz2#4460dad6376406c221406676208abae989c126115b0f0b2e46c8b8a027bf978a" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy2-v5.3.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux-armel.tar.bz2#0425f2022c35ef7f0bb3d2b854c5bcbe500b1aba511a0d83581ba6c784913961" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy2-v5.3.1-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux-armhf-raspbian.tar.bz2#5c93eb3c54fbb2c7d7332f775a096671512e590565e6051196bbc5039c5033b5" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy2-v5.3.1-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux-armhf-raring.tar.bz2#b4859496099bde4b17c1e56cc5749dcdcd25b4c68fde1d2ea426de84130e84cc" "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 "pypy2-v5.3.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux64.tar.bz2#6d0e8b14875b76b1e77f06a2ee3f1fb5015a645a951ba7a7586289344d4d9c22" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
install_package "pypy-5.3.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.3.1-linux_x86_64-portable.tar.bz2#73014c3840609a62c0984b9c383652097f0a8c52fb74dd9de70d9df2a9a743ff" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy2-v5.3.1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-osx64.tar.bz2#7a242d7373b4f18c7f5fe6c2fe6f15e2a405d9adf1f4f934c89b875e60ac5def" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"win32" )
|
||||
# FIXME: never tested on Windows
|
||||
install_zip "pypy2-v5.3.1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-win32.zip#d83477e2c5f032ebd8c7f47afce03dc8adbeb41a3c74f7db50d9de317dcf3a4a" "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-5.3-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
pypy2-v5.3.1-linux32.tar.bz2
|
||||
pypy2-v5.3.1-linux64.tar.bz2
|
||||
pypy2-v5.3.1-linux-armel.tar.bz2
|
||||
pypy2-v5.3.1-linux-armhf-raring.tar.bz2
|
||||
pypy2-v5.3.1-linux-armhf-raspbian.tar.bz2
|
||||
pypy2-v5.3.1-osx64.tar.bz2
|
||||
pypy2-v5.3.1-s390x.tar.bz2
|
||||
31a52bab584abf3a0f0defd1bf9a29131dab08df43885e7eeddfc7dc9b71836e pypy2-v5.3.1-src.tar.bz2
|
||||
7eab4a8435583750088001d88371cd0314999b67f26f32ab9d006802f0beec2e pypy2-v5.3.1-src.zip
|
||||
pypy2-v5.3.1-win32.zip
|
||||
16
plugins/python-build/share/python-build/pypy-portable-5.3.1
Normal file
16
plugins/python-build/share/python-build/pypy-portable-5.3.1
Normal file
@@ -0,0 +1,16 @@
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy-5.3.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.3.1-linux_i686-portable.tar.bz2#4460dad6376406c221406676208abae989c126115b0f0b2e46c8b8a027bf978a" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy-5.3.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.3.1-linux_x86_64-portable.tar.bz2#73014c3840609a62c0984b9c383652097f0a8c52fb74dd9de70d9df2a9a743ff" "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
|
||||
40
plugins/python-build/share/python-build/pypy3.3-5.2-alpha1
Normal file
40
plugins/python-build/share/python-build/pypy3.3-5.2-alpha1
Normal file
@@ -0,0 +1,40 @@
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||
install_package "pypy3.3-v5.2.0-alpha1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-linux32.tar.bz2#351aec101bdedddae7ea1b63845a5654b1a95fc9393894ef84a66749f6945f17" "pypy" verify_py33 ensurepip
|
||||
else
|
||||
install_package "pypy3.3-5.2-alpha-20160602-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.3-5.2-alpha-20160602-linux_i686-portable.tar.bz2#6f2412167c63d6711b41062a23794828f95a75400082a6957595867762cb170d" "pypy" verify_py33 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy3.3-v5.2.0-alpha1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-linux-armel.tar.bz2#ac83e632213f078ab60045e6ad0564b146d65dcd9a52c130026fab6dd85bf2dc" "pypy" verify_py33 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy3.3-v5.2.0-alpha1-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-linux-armhf-raspbian.tar.bz2#ba9a5d0cbac1c622363315b30df288ab2cf8fcccf7e2882bf5946115dbfa657e" "pypy" verify_py33 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy3.3-v5.2.0-alpha1-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-linux-armhf-raring.tar.bz2#b4d847d33c1bf9b3956d1d17b9e37505eb32f68e341c9333a74a82010a63e799" "pypy" verify_py33 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 "pypy3.3-v5.2.0-alpha1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-linux64.tar.bz2#f5e66ab24267d6ddf662d07c512d06c10ebc732ae62093dabbd775ac63b9060a" "pypy" verify_py33 ensurepip
|
||||
else
|
||||
install_package "pypy3.3-5.2-alpha-20160602-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.3-5.2-alpha-20160602-linux_x86_64-portable.tar.bz2#4d1e7dd727448c1b2caa90c943713c0aa10b32e9d977c2c3b348835f515a3ad4" "pypy" verify_py33 ensurepip
|
||||
fi
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy3.3-v5.2.0-alpha1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-osx64.tar.bz2#abaceab5d2790f49e04e0d80669283da41f94b77cf483b30ac0de48d3c19f304" "pypy" verify_py33 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy3.3-5.2-alpha1-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,2 @@
|
||||
require_gcc
|
||||
install_package "pypy3.3-v5.2.0-alpha1-src" "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2#344c2f088c82ea1274964bb0505ab80d3f9e538cc03f91aa109325ddbaa61426" "pypy_builder" verify_py33 ensurepip
|
||||
@@ -1,4 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_hg "stackless-dev" "http://hg.python.org/stackless" "default" standard verify_py33 ensurepip
|
||||
install_hg "stackless-dev" "http://hg.python.org/stackless" "default" standard verify_py35 ensurepip
|
||||
|
||||
@@ -8,6 +8,7 @@ export CC=cc
|
||||
export -n PYTHON_CONFIGURE_OPTS
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
mkdir -p "$INSTALL_ROOT"
|
||||
stub md5 false
|
||||
stub curl false
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
|
||||
export PYTHON_BUILD_CURL_OPTS=
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
mkdir "$PYTHON_BUILD_CACHE_PATH"
|
||||
}
|
||||
|
||||
@@ -57,7 +59,7 @@ setup() {
|
||||
local checksum="ba988b1bb4250dee0b9dd3d4d722f9c64b2bacfc805d1b6eba7426bda72dd3c5"
|
||||
|
||||
stub shasum true "echo invalid" "echo $checksum"
|
||||
stub curl "-*I* : true" \
|
||||
stub curl "-*I* * : true" \
|
||||
"-q -o * -*S* https://?*/$checksum : cp $FIXTURE_ROOT/package-1.0.0.tar.gz \$3"
|
||||
|
||||
touch "${PYTHON_BUILD_CACHE_PATH}/package-1.0.0.tar.gz"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_CURL_OPTS=
|
||||
|
||||
|
||||
@test "package URL without checksum" {
|
||||
@@ -103,6 +104,7 @@ export PYTHON_BUILD_CACHE_PATH=
|
||||
@test "existing tarball in build location is reused" {
|
||||
stub shasum true "echo ba988b1bb4250dee0b9dd3d4d722f9c64b2bacfc805d1b6eba7426bda72dd3c5"
|
||||
stub curl false
|
||||
stub curl false
|
||||
stub wget false
|
||||
|
||||
export -n PYTHON_BUILD_CACHE_PATH
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_ARIA2_OPTS=
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
export PYTHON_BUILD_BUILD_PATH="${TMP}/source"
|
||||
mkdir -p "${PYTHON_BUILD_BUILD_PATH}"
|
||||
}
|
||||
@@ -18,6 +20,20 @@ setup() {
|
||||
assert_output_contains "error: failed to download package-1.0.0.tar.gz"
|
||||
}
|
||||
|
||||
@test "using aria2c if available" {
|
||||
stub aria2c "--allow-overwrite=true --no-conf=true -o * http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$4"
|
||||
|
||||
install_fixture definitions/without-checksum
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
Downloading package-1.0.0.tar.gz...
|
||||
-> http://example.com/packages/package-1.0.0.tar.gz
|
||||
Installing package-1.0.0...
|
||||
Installed package-1.0.0 to ${TMP}/install
|
||||
OUT
|
||||
unstub aria2c
|
||||
}
|
||||
|
||||
@test "fetching from git repository" {
|
||||
stub git "clone --depth 1 --branch master http://example.com/packages/package.git package-dev : mkdir package-dev"
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
export PYENV_ROOT="${TMP}/pyenv"
|
||||
export HOOK_PATH="${TMP}/i has hooks"
|
||||
mkdir -p "$HOOK_PATH"
|
||||
|
||||
@@ -4,6 +4,7 @@ load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_MIRROR_URL=http://mirror.example.com
|
||||
export PYTHON_BUILD_CURL_OPTS=
|
||||
|
||||
|
||||
@test "package URL without checksum bypasses mirror" {
|
||||
|
||||
@@ -4,6 +4,7 @@ load test_helper
|
||||
export PYENV_ROOT="${TMP}/pyenv"
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
stub pyenv-hooks 'install : true'
|
||||
stub pyenv-rehash 'true'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ export CC=cc
|
||||
export TMP_FIXTURES="$TMP/fixtures"
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
mkdir -p "$INSTALL_ROOT"
|
||||
stub md5 false
|
||||
stub curl false
|
||||
|
||||
@@ -9,6 +9,39 @@ if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then
|
||||
export PATH
|
||||
fi
|
||||
|
||||
remove_command_from_path() {
|
||||
OLDIFS="${IFS}"
|
||||
local cmd="$1"
|
||||
local path
|
||||
local paths=()
|
||||
IFS=:
|
||||
for path in ${PATH}; do
|
||||
if [ -e "${path}/${cmd}" ]; then
|
||||
local tmp_path="$(mktemp -d "${TMP}/path.XXXXX")"
|
||||
ln -fs "${path}"/* "${tmp_path}"
|
||||
rm -f "${tmp_path}/${cmd}"
|
||||
paths["${#paths[@]}"]="${tmp_path}"
|
||||
else
|
||||
paths["${#paths[@]}"]="${path}"
|
||||
fi
|
||||
done
|
||||
export PATH="${paths[*]}"
|
||||
IFS="${OLDIFS}"
|
||||
}
|
||||
|
||||
ensure_not_found_in_path() {
|
||||
local cmd
|
||||
for cmd; do
|
||||
if command -v "${cmd}" 1>/dev/null 2>&1; then
|
||||
remove_command_from_path "${cmd}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
setup() {
|
||||
ensure_not_found_in_path aria2c
|
||||
}
|
||||
|
||||
teardown() {
|
||||
rm -fr "${TMP:?}"/*
|
||||
}
|
||||
|
||||
69
pyenv.d/rehash/anaconda.bash
Normal file
69
pyenv.d/rehash/anaconda.bash
Normal file
@@ -0,0 +1,69 @@
|
||||
# Anaconda comes with binaries of system packages (e.g. `openssl`, `curl`).
|
||||
# Creating shims for those binaries will prevent pyenv users to run those
|
||||
# commands normally when not using Anaconda.
|
||||
#
|
||||
# This hooks is intended to skip creating shims for those executables.
|
||||
|
||||
conda_exists() {
|
||||
shopt -s nullglob
|
||||
local condas=($(echo "${PYENV_ROOT}/versions/"*"/bin/conda" "${PYENV_ROOT}/versions/"*"/envs/"*"/bin/conda"))
|
||||
shopt -u nullglob
|
||||
[ -n "${condas}" ]
|
||||
}
|
||||
|
||||
conda_shim() {
|
||||
case "${1##*/}" in
|
||||
"curl" | "curl-config" )
|
||||
return 0 # curl
|
||||
;;
|
||||
"fc-cache" | "fc-cat" | "fc-list" | "fc-match" | "fc-pattern" | "fc-query" | "fc-scan" | "fc-validate" )
|
||||
return 0 # fontconfig
|
||||
;;
|
||||
"freetype-config" )
|
||||
return 0 # freetype
|
||||
;;
|
||||
"libpng-config" )
|
||||
return 0 # libpng
|
||||
;;
|
||||
"openssl" )
|
||||
return 0 # openssl
|
||||
;;
|
||||
"assistant" | "designer" | "lconvert" | "linguist" | "lrelease" | "lupdate" | "moc" | "pixeltool" | "qcollectiongenerator" | "qdbus" | "qdbuscpp2xml" | "qdbusviewer" | "qdbusxml2cpp" | "qhelpconverter" | "qhelpgenerator" | "qmake" | "qmlplugindump" | "qmlviewer" | "qtconfig" | "rcc" | "uic" | "xmlpatterns" | "xmlpatternsvalidator" )
|
||||
return 0 # qtchooser
|
||||
;;
|
||||
"redis-benchmark" | "redis-check-aof" | "redis-check-dump" | "redis-cli" | "redis-server" )
|
||||
return 0 # redis
|
||||
;;
|
||||
"sqlite3" )
|
||||
return 0 # sqlite3
|
||||
;;
|
||||
"xml2-config" )
|
||||
return 0 # libxml2
|
||||
;;
|
||||
"xslt-config" )
|
||||
return 0 # libxslt
|
||||
;;
|
||||
"xsltproc" )
|
||||
return 0 # xsltproc
|
||||
;;
|
||||
"unxz" | "xz" | "xzcat" | "xzcmd" | "xzdiff" | "xzegrep" | "xzfgrep" | "xzgrep" | "xzless" | "xzmore" )
|
||||
return 0 # xz-utils
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
|
||||
deregister_conda_shims() {
|
||||
local shim
|
||||
local shims=()
|
||||
for shim in ${registered_shims}; do
|
||||
if ! conda_shim "${shim}" 1>&2; then
|
||||
shims[${#shims[*]}]="${shim}"
|
||||
fi
|
||||
done
|
||||
registered_shims="${shims[@]}"
|
||||
}
|
||||
|
||||
if conda_exists; then
|
||||
deregister_conda_shims
|
||||
fi
|
||||
@@ -1,170 +0,0 @@
|
||||
# Anaconda comes with binaries of system packages (e.g. `openssl`, `curl`).
|
||||
# Creating shims for those binaries will prevent pyenv users to run those
|
||||
# commands normally when not using Anaconda.
|
||||
#
|
||||
# This is a limited edition of https://github.com/yyuu/pyenv-which-ext
|
||||
# and it will looks for original `PATH` if there is Anaconda/Miniconda
|
||||
# installed and the command name is blacklisted.
|
||||
|
||||
conda_exists() {
|
||||
shopt -s nullglob
|
||||
local condas=($(echo "${PYENV_ROOT}/versions/"*"/bin/conda" "${PYENV_ROOT}/versions/"*"/envs/"*"/bin/conda"))
|
||||
shopt -u nullglob
|
||||
[ -n "${condas}" ]
|
||||
}
|
||||
|
||||
conda_shims() {
|
||||
## curl
|
||||
cat <<EOS
|
||||
curl
|
||||
curl-config
|
||||
EOS
|
||||
|
||||
## fontconfig
|
||||
cat <<EOS
|
||||
fc-cache
|
||||
fc-cat
|
||||
fc-list
|
||||
fc-match
|
||||
fc-pattern
|
||||
fc-query
|
||||
fc-scan
|
||||
fc-validate
|
||||
EOS
|
||||
|
||||
## freetype
|
||||
cat <<EOS
|
||||
freetype-config
|
||||
EOS
|
||||
|
||||
## libpng
|
||||
cat <<EOS
|
||||
libpng-config
|
||||
EOS
|
||||
|
||||
## openssl
|
||||
cat <<EOS
|
||||
openssl
|
||||
EOS
|
||||
|
||||
## qtchooser
|
||||
cat <<EOS
|
||||
assistant
|
||||
designer
|
||||
lconvert
|
||||
linguist
|
||||
lrelease
|
||||
lupdate
|
||||
moc
|
||||
pixeltool
|
||||
qcollectiongenerator
|
||||
qdbus
|
||||
qdbuscpp2xml
|
||||
qdbusviewer
|
||||
qdbusxml2cpp
|
||||
qhelpconverter
|
||||
qhelpgenerator
|
||||
qmake
|
||||
qmlplugindump
|
||||
qmlviewer
|
||||
qtconfig
|
||||
rcc
|
||||
uic
|
||||
xmlpatterns
|
||||
xmlpatternsvalidator
|
||||
EOS
|
||||
|
||||
## redis
|
||||
cat <<EOS
|
||||
redis-benchmark
|
||||
redis-check-aof
|
||||
redis-check-dump
|
||||
redis-cli
|
||||
redis-server
|
||||
EOS
|
||||
|
||||
## sqlite3
|
||||
cat <<EOS
|
||||
sqlite3
|
||||
EOS
|
||||
|
||||
## libxml2
|
||||
cat <<EOS
|
||||
xml2-config
|
||||
EOS
|
||||
|
||||
## libxslt
|
||||
cat <<EOS
|
||||
xslt-config
|
||||
EOS
|
||||
|
||||
## xsltproc
|
||||
cat <<EOS
|
||||
xsltproc
|
||||
EOS
|
||||
|
||||
# xz-utils
|
||||
cat <<EOS
|
||||
xz
|
||||
EOS
|
||||
}
|
||||
|
||||
expand_path() {
|
||||
if [ ! -d "$1" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
local cwd="$(pwd)"
|
||||
cd "$1"
|
||||
pwd
|
||||
cd "$cwd"
|
||||
}
|
||||
|
||||
remove_from_path() {
|
||||
local path_to_remove="$(expand_path "$1")"
|
||||
local result=""
|
||||
|
||||
if [ -z "$path_to_remove" ]; then
|
||||
echo "${PATH}"
|
||||
return
|
||||
fi
|
||||
|
||||
local paths
|
||||
IFS=: paths=($PATH)
|
||||
|
||||
for path in "${paths[@]}"; do
|
||||
path="$(expand_path "$path" || true)"
|
||||
if [ -n "$path" ] && [ "$path" != "$path_to_remove" ]; then
|
||||
result="${result}${path}:"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${result%:}"
|
||||
}
|
||||
|
||||
lookup_from_path() {
|
||||
local command_to_lookup="$1"
|
||||
local original_path="${PATH}"
|
||||
PATH="$(remove_from_path "${PYENV_ROOT}/shims")"
|
||||
local result="$(command -v "$command_to_lookup" || true)"
|
||||
PATH="${original_path}"
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
if [ -n "$PYENV_COMMAND" ]; then
|
||||
if conda_exists; then
|
||||
if [ -x "$PYENV_COMMAND_PATH" ]; then
|
||||
# `curl` bundled with Anaconda does not work on Debian
|
||||
# https://github.com/ContinuumIO/anaconda-issues/issues/72
|
||||
if [[ "$PYENV_COMMAND" == "curl" ]] && [[ -x "${PYENV_COMMAND_PATH%/*}/curl-config" ]]; then
|
||||
if [ ! -f "$("${PYENV_COMMAND_PATH%/*}/curl-config" --ca 2>/dev/null || true)" ]; then
|
||||
PYENV_COMMAND_PATH="$(lookup_from_path "$PYENV_COMMAND" || true)"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if conda_shims | grep -q -x "$PYENV_COMMAND"; then
|
||||
PYENV_COMMAND_PATH="$(lookup_from_path "$PYENV_COMMAND" || true)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -53,7 +53,7 @@ OUT
|
||||
@test "fish instructions" {
|
||||
run pyenv-init fish
|
||||
assert [ "$status" -eq 1 ]
|
||||
assert_line 'status --is-interactive; and . (pyenv init -|psub)'
|
||||
assert_line 'status --is-interactive; and source (pyenv init -|psub)'
|
||||
}
|
||||
|
||||
@test "option to skip rehash" {
|
||||
|
||||
Reference in New Issue
Block a user