mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-13 13:53:53 -05:00
Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78b9cee98e | ||
|
|
f72fc8eabc | ||
|
|
180ff6c955 | ||
|
|
6a8003d56d | ||
|
|
739392a2e4 | ||
|
|
0a19b2fa02 | ||
|
|
d594bcadb3 | ||
|
|
eb6e24cef1 | ||
|
|
9c12b302eb | ||
|
|
cdf7e6c924 | ||
|
|
bd312d652e | ||
|
|
916d0eae8e | ||
|
|
23364549d7 | ||
|
|
e92a7de031 | ||
|
|
8ef30d9e4d | ||
|
|
74d5dba06a | ||
|
|
6bd7927333 | ||
|
|
4684507021 | ||
|
|
12069a1118 | ||
|
|
30538b0672 | ||
|
|
fd893ea3b0 | ||
|
|
be3fc6d8cb | ||
|
|
41ce3aade2 | ||
|
|
29b4da7737 | ||
|
|
ad7dfa63ab | ||
|
|
35ca51fe88 | ||
|
|
d6ab394efd | ||
|
|
d29ba1f80e | ||
|
|
c38833179b | ||
|
|
565798d617 | ||
|
|
0f7a2cad8d | ||
|
|
5ccba5d7cc | ||
|
|
2cc2ec160e | ||
|
|
a95ccd09a2 | ||
|
|
e199a3d8f7 | ||
|
|
fec0f56d0b | ||
|
|
fe809ea90d | ||
|
|
f880dc6d6f | ||
|
|
3c9674453f | ||
|
|
22f4980a21 | ||
|
|
abbcde665c | ||
|
|
c9c9415154 | ||
|
|
3997a394d9 | ||
|
|
e0b85397c8 | ||
|
|
e554cd86c3 | ||
|
|
38692f97fe | ||
|
|
7e5680a0d8 | ||
|
|
d51f6d4376 | ||
|
|
a9a9636d1e | ||
|
|
32030e2ed9 | ||
|
|
f9d8b551dc | ||
|
|
2c7960102c | ||
|
|
1a0be6f0ad | ||
|
|
6481cbb172 | ||
|
|
6e30032278 | ||
|
|
4fde4ecbaf | ||
|
|
40c1d27445 | ||
|
|
97f0499f43 | ||
|
|
c3a5f91ed0 | ||
|
|
258e4413b1 | ||
|
|
a62a75369e | ||
|
|
ba072adcb9 | ||
|
|
ca25259900 |
17
CHANGELOG.md
17
CHANGELOG.md
@@ -1,5 +1,22 @@
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
## 20160422
|
||||||
|
|
||||||
|
* python-build: Added PyPy 5.1 (#579)
|
||||||
|
* python-build: Added PyPy 5.1 Portable
|
||||||
|
* python-build: Added PyPy 5.0.1 (#558)
|
||||||
|
* python-build: Added PyPy 5.0.1 Portable
|
||||||
|
* python-build: Added PyPy 5.0 Portable
|
||||||
|
* python-build: Added anaconda[23]-4.0.0 (#572)
|
||||||
|
* python-build: Added Jython 2.7.1b3 (#557)
|
||||||
|
|
||||||
|
## 20160310
|
||||||
|
|
||||||
|
* python-build: Add PyPy-5.0.0 (#555)
|
||||||
|
* pyenv: Import recent changes from rbenv 1.0 (#549)
|
||||||
|
|
||||||
## 20160303
|
## 20160303
|
||||||
|
|
||||||
* python-build: Add anaconda[23]-2.5.0 (#543)
|
* python-build: Add anaconda[23]-2.5.0 (#543)
|
||||||
|
|||||||
80
CONDUCT.md
Normal file
80
CONDUCT.md
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity and
|
||||||
|
orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting one of the project maintainers listed below. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Project Maintainers
|
||||||
|
|
||||||
|
* Sam Stephenson <<sstephenson@gmail.com>>
|
||||||
|
* Mislav Marohnić <<mislav.marohnic@gmail.com>>
|
||||||
|
* Erik Michaels-Ober <<sferik@gmail.com>>
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
10
README.md
10
README.md
@@ -225,16 +225,6 @@ easy to fork and contribute any changes back upstream.
|
|||||||
please visit the wiki page about
|
please visit the wiki page about
|
||||||
[Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems)
|
[Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems)
|
||||||
|
|
||||||
6. **Rebuild the shim binaries.**
|
|
||||||
You should do this any time you install a new Python binary.
|
|
||||||
(Examples: installing a new Python version, or installing a package that provides a binary.)
|
|
||||||
|
|
||||||
$ pyenv rehash
|
|
||||||
|
|
||||||
This can be automated for pip using
|
|
||||||
[pyenv-pip-rehash](https://github.com/yyuu/pyenv-pip-rehash), which invokes
|
|
||||||
`pyenv rehash` after (un)installing packages using pip.
|
|
||||||
|
|
||||||
|
|
||||||
#### Upgrading
|
#### Upgrading
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# `python-local-exec` is a drop-in replacement for the standard Python
|
|
||||||
# shebang line:
|
|
||||||
#
|
|
||||||
# #!/usr/bin/env python-local-exec
|
|
||||||
#
|
|
||||||
# Use it for scripts inside a project with an `.pyenv-version`
|
|
||||||
# file. When you run the scripts, they'll use the project-specified
|
|
||||||
# Python version, regardless of what directory they're run from. Useful
|
|
||||||
# for e.g. running project tasks in cron scripts without needing to
|
|
||||||
# `cd` into the project first.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
export PYENV_DIR="${1%/*}"
|
|
||||||
|
|
||||||
[ -n "$PYENV_SILENCE_WARNINGS" ] || {
|
|
||||||
echo "pyenv: \`python-local-exec' is deprecated and will be removed in the next release."
|
|
||||||
echo " To upgrade: https://github.com/yyuu/pyenv/wiki/python-local-exec"
|
|
||||||
echo
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
exec python "$@"
|
|
||||||
@@ -97,6 +97,7 @@ PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib
|
|||||||
for plugin_hook in "${PYENV_ROOT}/plugins/"*/etc/pyenv.d; do
|
for plugin_hook in "${PYENV_ROOT}/plugins/"*/etc/pyenv.d; do
|
||||||
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${plugin_hook}"
|
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${plugin_hook}"
|
||||||
done
|
done
|
||||||
|
PYENV_HOOK_PATH="${PYENV_HOOK_PATH#:}"
|
||||||
export PYENV_HOOK_PATH
|
export PYENV_HOOK_PATH
|
||||||
|
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|||||||
@@ -12,15 +12,12 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
version="20160303"
|
version="20160422"
|
||||||
git_revision=""
|
git_revision=""
|
||||||
|
|
||||||
for source_dir in "${BASH_SOURCE%/*}" "$PYENV_ROOT"; do
|
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||||
if cd "$source_dir" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
|
||||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||||
git_revision="${git_revision#v}"
|
git_revision="${git_revision#v}"
|
||||||
[ -z "$git_revision" ] || break
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "pyenv ${git_revision:-$version}"
|
echo "pyenv ${git_revision:-$version}"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ set -e
|
|||||||
if [ "$1" = "--complete" ]; then
|
if [ "$1" = "--complete" ]; then
|
||||||
echo exec
|
echo exec
|
||||||
echo rehash
|
echo rehash
|
||||||
|
echo version-name
|
||||||
|
echo version-origin
|
||||||
echo which
|
echo which
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ done
|
|||||||
|
|
||||||
shell="$1"
|
shell="$1"
|
||||||
if [ -z "$shell" ]; then
|
if [ -z "$shell" ]; then
|
||||||
shell="$(ps c -p "$PPID" -o 'ucomm=' 2>/dev/null || true)"
|
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
|
||||||
shell="${shell##-}"
|
|
||||||
shell="${shell%% *}"
|
shell="${shell%% *}"
|
||||||
|
shell="${shell##-}"
|
||||||
shell="${shell:-$SHELL}"
|
shell="${shell:-$SHELL}"
|
||||||
shell="${shell##*/}"
|
shell="${shell##*/}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -15,10 +15,6 @@
|
|||||||
# `PYENV_VERSION' environment variable takes precedence over local
|
# `PYENV_VERSION' environment variable takes precedence over local
|
||||||
# and global versions.
|
# and global versions.
|
||||||
#
|
#
|
||||||
# For backwards compatibility, pyenv will also read version
|
|
||||||
# specifications from `.pyenv-version' files, but a `.python-version'
|
|
||||||
# file in the same directory takes precedence.
|
|
||||||
#
|
|
||||||
# <version> should be a string matching a Python version known to pyenv.
|
# <version> should be a string matching a Python version known to pyenv.
|
||||||
# The special version string `system' will use your default system Python.
|
# The special version string `system' will use your default system Python.
|
||||||
# Run `pyenv versions' for a list of available Python versions.
|
# Run `pyenv versions' for a list of available Python versions.
|
||||||
@@ -36,27 +32,17 @@ fi
|
|||||||
versions=("$@")
|
versions=("$@")
|
||||||
|
|
||||||
if [ "$versions" = "--unset" ]; then
|
if [ "$versions" = "--unset" ]; then
|
||||||
rm -f .python-version .pyenv-version
|
rm -f .python-version
|
||||||
elif [ -n "$versions" ]; then
|
elif [ -n "$versions" ]; then
|
||||||
previous_file="$(PYENV_VERSION= pyenv-version-origin || true)"
|
|
||||||
pyenv-version-file-write .python-version "${versions[@]}"
|
pyenv-version-file-write .python-version "${versions[@]}"
|
||||||
if [ "$previous_file" -ef .pyenv-version ]; then
|
|
||||||
rm -f .pyenv-version
|
|
||||||
{ echo "pyenv: removed existing \`.pyenv-version' file and migrated"
|
|
||||||
echo " local version specification to \`.python-version' file"
|
|
||||||
} >&2
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
OLDIFS="$IFS"
|
if version_file="$(pyenv-version-file "$PWD")"; then
|
||||||
IFS=: versions=($(
|
IFS=: versions=($(pyenv-version-file-read "$version_file"))
|
||||||
pyenv-version-file-read .python-version ||
|
|
||||||
pyenv-version-file-read .pyenv-version ||
|
|
||||||
{ echo "pyenv: no local version configured for this directory"
|
|
||||||
exit 1
|
|
||||||
} >&2
|
|
||||||
))
|
|
||||||
IFS="$OLDIFS"
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
echo "$version"
|
echo "$version"
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo "pyenv: no local version configured for this directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,35 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Usage: pyenv version-file [<dir>]
|
||||||
# Summary: Detect the file that sets the current pyenv version
|
# Summary: Detect the file that sets the current pyenv version
|
||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
|
target_dir="$1"
|
||||||
|
|
||||||
find_local_version_file() {
|
find_local_version_file() {
|
||||||
local root="$1"
|
local root="$1"
|
||||||
while true; do
|
while ! [[ "$root" =~ ^//[^/]*$ ]]; do
|
||||||
[[ "$root" =~ ^//[^/]*$ ]] && break
|
|
||||||
if [ -e "${root}/.python-version" ]; then
|
if [ -e "${root}/.python-version" ]; then
|
||||||
echo "${root}/.python-version"
|
echo "${root}/.python-version"
|
||||||
exit
|
return 0
|
||||||
elif [ -e "${root}/.pyenv-version" ]; then
|
|
||||||
echo "${root}/.pyenv-version"
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
[ -n "$root" ] || break
|
[ -n "$root" ] || break
|
||||||
root="${root%/*}"
|
root="${root%/*}"
|
||||||
done
|
done
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
find_local_version_file "$PYENV_DIR"
|
if [ -n "$target_dir" ]; then
|
||||||
[ "$PYENV_DIR" = "$PWD" ] || find_local_version_file "$PWD"
|
find_local_version_file "$target_dir"
|
||||||
|
|
||||||
global_version_file="${PYENV_ROOT}/version"
|
|
||||||
|
|
||||||
if [ -e "$global_version_file" ]; then
|
|
||||||
echo "$global_version_file"
|
|
||||||
elif [ -e "${PYENV_ROOT}/global" ]; then
|
|
||||||
echo "${PYENV_ROOT}/global"
|
|
||||||
elif [ -e "${PYENV_ROOT}/default" ]; then
|
|
||||||
echo "${PYENV_ROOT}/default"
|
|
||||||
else
|
else
|
||||||
echo "$global_version_file"
|
find_local_version_file "$PYENV_DIR" || {
|
||||||
|
[ "$PYENV_DIR" != "$PWD" ] && find_local_version_file "$PWD"
|
||||||
|
} || echo "${PYENV_ROOT}/version"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ if [ -z "$PYENV_VERSION" ]; then
|
|||||||
PYENV_VERSION="$(pyenv-version-file-read "$PYENV_VERSION_FILE" || true)"
|
PYENV_VERSION="$(pyenv-version-file-read "$PYENV_VERSION_FILE" || true)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=$'\n' scripts=(`pyenv-hooks version-name`)
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
for script in "${scripts[@]}"; do
|
||||||
|
source "$script"
|
||||||
|
done
|
||||||
|
|
||||||
if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ]; then
|
if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ]; then
|
||||||
echo "system"
|
echo "system"
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -3,7 +3,18 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
if [ -n "$PYENV_VERSION" ]; then
|
unset PYENV_VERSION_ORIGIN
|
||||||
|
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=$'\n' scripts=(`pyenv-hooks version-origin`)
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
for script in "${scripts[@]}"; do
|
||||||
|
source "$script"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$PYENV_VERSION_ORIGIN" ]; then
|
||||||
|
echo "$PYENV_VERSION_ORIGIN"
|
||||||
|
elif [ -n "$PYENV_VERSION" ]; then
|
||||||
echo "PYENV_VERSION environment variable"
|
echo "PYENV_VERSION environment variable"
|
||||||
else
|
else
|
||||||
pyenv-version-file
|
pyenv-version-file
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ done
|
|||||||
|
|
||||||
versions_dir="${PYENV_ROOT}/versions"
|
versions_dir="${PYENV_ROOT}/versions"
|
||||||
|
|
||||||
if ! enable -f "${BASH_SOURCE%/*}"/../libexec/pyenv-realpath.dylib realpath 2>/dev/null; then
|
if ! enable -f "${BASH_SOURCE%/*}"/pyenv-realpath.dylib realpath 2>/dev/null; then
|
||||||
if [ -n "$PYENV_NATIVE_EXT" ]; then
|
if [ -n "$PYENV_NATIVE_EXT" ]; then
|
||||||
echo "pyenv: failed to load \`realpath' builtin" >&2
|
echo "pyenv: failed to load \`realpath' builtin" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
1
plugins/python-build/share/python-build/anaconda-4.0.0
Normal file
1
plugins/python-build/share/python-build/anaconda-4.0.0
Normal file
@@ -0,0 +1 @@
|
|||||||
|
source "${BASH_SOURCE%/*}/anaconda2-4.0.0"
|
||||||
19
plugins/python-build/share/python-build/anaconda2-4.0.0
Normal file
19
plugins/python-build/share/python-build/anaconda2-4.0.0
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||||
|
"Linux-x86" )
|
||||||
|
install_script "Anaconda2-4.0.0-Linux-x86" "https://repo.continuum.io/archive/Anaconda2-4.0.0-Linux-x86.sh#f87d5a014499bd9a579ada3939eb22b1" "anaconda" verify_py27
|
||||||
|
;;
|
||||||
|
"Linux-x86_64" )
|
||||||
|
install_script "Anaconda2-4.0.0-Linux-x86_64" "https://repo.continuum.io/archive/Anaconda2-4.0.0-Linux-x86_64.sh#31ed3ef07435d7068e1e03be49381b13" "anaconda" verify_py27
|
||||||
|
;;
|
||||||
|
"MacOSX-x86_64" )
|
||||||
|
install_script "Anaconda2-4.0.0-MacOSX-x86_64" "https://repo.continuum.io/archive/Anaconda2-4.0.0-MacOSX-x86_64.sh#a3443b46f99bc6680c77c688af1b1f5a" "anaconda" verify_py27
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of Anaconda2 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
19
plugins/python-build/share/python-build/anaconda3-4.0.0
Normal file
19
plugins/python-build/share/python-build/anaconda3-4.0.0
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||||
|
"Linux-x86" )
|
||||||
|
install_script "Anaconda3-4.0.0-Linux-x86" "https://repo.continuum.io/archive/Anaconda3-4.0.0-Linux-x86.sh#c88cbe27cc8fb4976e6bd38068cc57d6" "anaconda" verify_py35
|
||||||
|
;;
|
||||||
|
"Linux-x86_64" )
|
||||||
|
install_script "Anaconda3-4.0.0-Linux-x86_64" "https://repo.continuum.io/archive/Anaconda3-4.0.0-Linux-x86_64.sh#546d1f02597587c685fa890c1d713b51" "anaconda" verify_py35
|
||||||
|
;;
|
||||||
|
"MacOSX-x86_64" )
|
||||||
|
install_script "Anaconda3-4.0.0-MacOSX-x86_64" "https://repo.continuum.io/archive/Anaconda3-4.0.0-MacOSX-x86_64.sh#efd870aa3fabc8f4865a1b9567e69b69" "anaconda" verify_py35
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ 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
|
||||||
13
plugins/python-build/share/python-build/jython-2.7.1b3
Normal file
13
plugins/python-build/share/python-build/jython-2.7.1b3
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
require_java
|
||||||
|
install_jar "jython-2.7.1b3" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b3/jython-installer-2.7.1b3.jar#5c6c7dc372a131dbc2b29b95407c69a4ebab22c1823d9098b7f993444f3090c5" jython
|
||||||
|
|
||||||
|
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
|
||||||
|
if [ -z "${JAVA_HOME+defined}" ]; then
|
||||||
|
colorize 1 "WARNING: "
|
||||||
|
echo "Please ensure that your JAVA_HOME environment variable is set correctly!"
|
||||||
|
echo "See http://bugs.jython.org/issue2346 for details."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-2.4.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux.tar.bz2#a24adb366f87ac0eba829d7188a156a7d897e71893689fab06502c3f4152ac0e" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.4.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux.tar.bz2#a24adb366f87ac0eba829d7188a156a7d897e71893689fab06502c3f4152ac0e" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
install_package "pypy-2.4-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.4-linux_i686-portable.tar.bz2#2a330bbeae038c143366982f2104bf4096752f1ec7520fc5608f0527c124b0c2" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.4-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.4-linux_i686-portable.tar.bz2#2a330bbeae038c143366982f2104bf4096752f1ec7520fc5608f0527c124b0c2" "pypy" verify_py27 ensurepip
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-2.4.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux-armel.tar.bz2#8362d634bf86fbfb3b99b578b13c0a9fd673b2b7580d6d65b4a181934c659ccd" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.4.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux-armel.tar.bz2#8362d634bf86fbfb3b99b578b13c0a9fd673b2b7580d6d65b4a181934c659ccd" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-2.5.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux.tar.bz2#3dfd56a986d25929b4ed9f40a5484f72f1d513cd816cf8aaa683106c3391247c" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.5.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux.tar.bz2#3dfd56a986d25929b4ed9f40a5484f72f1d513cd816cf8aaa683106c3391247c" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
install_package "pypy-2.5-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.5-linux_i686-portable.tar.bz2#6cbe3e1a48900f22c8e4412f82906fba92dd4a165bac5fe6866a2a26383fe3b8" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.5-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.5-linux_i686-portable.tar.bz2#6cbe3e1a48900f22c8e4412f82906fba92dd4a165bac5fe6866a2a26383fe3b8" "pypy" verify_py27 ensurepip
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-2.5.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux-armel.tar.bz2#277fa6c61d63af96893dafd19e1ffea7b988397c6a0fd66cd99dc0db1029be56" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.5.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux-armel.tar.bz2#277fa6c61d63af96893dafd19e1ffea7b988397c6a0fd66cd99dc0db1029be56" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-2.5.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux.tar.bz2#c0035a2650cafcb384050a8c476ddc41c9fd40b0c3677fab68026f57c715907a" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.5.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux.tar.bz2#c0035a2650cafcb384050a8c476ddc41c9fd40b0c3677fab68026f57c715907a" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
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
|
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
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-2.5.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux-armel.tar.bz2#91d68551b6e738c1e47aaed869a6df8208abb8c60194a1647c6aa13c7363a61d" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.5.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux-armel.tar.bz2#91d68551b6e738c1e47aaed869a6df8208abb8c60194a1647c6aa13c7363a61d" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.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
|
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
|
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
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.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
|
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" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ case "$(pypy_architecture 2>/dev/null || true)" in
|
|||||||
install_package "pypy-2.6.1-freebsd64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-freebsd64.tar.bz2#58118e88ce01c1d48b31d293db40687efbdeba54334eb55ba96de9ecf3c39055" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.6.1-freebsd64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-freebsd64.tar.bz2#58118e88ce01c1d48b31d293db40687efbdeba54334eb55ba96de9ecf3c39055" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-2.6.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux.tar.bz2#d010b1f1aafdb01beb107f16843985508ce81698260ce830690686d9b2768c88" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.6.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux.tar.bz2#d010b1f1aafdb01beb107f16843985508ce81698260ce830690686d9b2768c88" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
install_package "pypy-2.6.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_i686-portable.tar.bz2#af8f05790fe21bffdb0619d39f2890e2ecabe47bbd3b21c2c97b9778e4cdb378" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.6.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_i686-portable.tar.bz2#af8f05790fe21bffdb0619d39f2890e2ecabe47bbd3b21c2c97b9778e4cdb378" "pypy" verify_py27 ensurepip
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-2.6.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux-armel.tar.bz2#0ca15d289e78a82f927b375a016b7c3246accac5d7eebded4e32a496fb3245ab" "pypy" verify_py27 ensurepip
|
install_package "pypy-2.6.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux-armel.tar.bz2#0ca15d289e78a82f927b375a016b7c3246accac5d7eebded4e32a496fb3245ab" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-4.0.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux.tar.bz2#365600947775bc73a902a5b1d11f8b96cf49f07cdbbab28bb47240097b4bb4c5" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux.tar.bz2#365600947775bc73a902a5b1d11f8b96cf49f07cdbbab28bb47240097b4bb4c5" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
install_package "pypy-4.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-4.0-linux_i686-portable.tar.bz2#8d6b775a1fdc79db453f80e6b50cd9979d89be3714cd71d3af21bf9f56745610" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-4.0-linux_i686-portable.tar.bz2#8d6b775a1fdc79db453f80e6b50cd9979d89be3714cd71d3af21bf9f56745610" "pypy" verify_py27 ensurepip
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-4.0.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux-armel.tar.bz2#612df41fa21c5bc95d8d3575e0d8c09f605de6f0684109222afa561672dd9c7b" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux-armel.tar.bz2#612df41fa21c5bc95d8d3575e0d8c09f605de6f0684109222afa561672dd9c7b" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
"linux" )
|
"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
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
install_package "pypy-4.0.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux.tar.bz2#721920fcbb6aefc9a98e868e32b7f4ea5fd68b7f9305d08d0a2595327c9c0611" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux.tar.bz2#721920fcbb6aefc9a98e868e32b7f4ea5fd68b7f9305d08d0a2595327c9c0611" "pypy" verify_py27 ensurepip
|
||||||
else
|
else
|
||||||
install_package "pypy-4.0.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-4.0.1-linux_i686-portable.tar.bz2#2a1078bf36372b1c2919c11c418860dd7f0d44c92e6772bb36490eaf793b5c47" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-4.0.1-linux_i686-portable.tar.bz2#2a1078bf36372b1c2919c11c418860dd7f0d44c92e6772bb36490eaf793b5c47" "pypy" verify_py27 ensurepip
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"linux-armel" )
|
"linux-armel" )
|
||||||
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
require_distro "Ubuntu 12.04" || true
|
||||||
install_package "pypy-4.0.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux-armel.tar.bz2#d1acdd45ebd34580dd632c63c95211f6bae5e9a8f7a46ffa6f0443286ff9f61b" "pypy" verify_py27 ensurepip
|
install_package "pypy-4.0.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux-armel.tar.bz2#d1acdd45ebd34580dd632c63c95211f6bae5e9a8f7a46ffa6f0443286ff9f61b" "pypy" verify_py27 ensurepip
|
||||||
;;
|
;;
|
||||||
"linux-armhf" )
|
"linux-armhf" )
|
||||||
|
|||||||
52
plugins/python-build/share/python-build/pypy-5.0.0
Normal file
52
plugins/python-build/share/python-build/pypy-5.0.0
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
|
install_package "pypy-5.0.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux.tar.bz2#a9cc9afa94ff1cde811626a70081c477c9840e7816c0562d1903fd823d222ceb" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0-linux_i686-portable.tar.bz2#316e03afdd2f6212857789933c01f0d41a1665c80d28526c0fb4082b6d3f4f60" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-armel" )
|
||||||
|
require_distro "Ubuntu 12.04" || true
|
||||||
|
install_package "pypy-5.0.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux-armel.tar.bz2#87bd85441b16ecca0d45ba6e9c0e9d26bb7bd8867afbf79d80312cf79b032dc1" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-armhf" )
|
||||||
|
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||||
|
install_package "pypy-5.0.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux-armhf-raspbian.tar.bz2#8033c0cc39e9f6771688f2eda95c726595f5453b3e73e1cd5f7ebbe3dae1f685" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
require_distro "Ubuntu 13.04" || true
|
||||||
|
install_package "pypy-5.0.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux-armhf-raring.tar.bz2#5bb52cf5db4ae8497c4e03cd8a70e49867e6b93d9f29ad335d030fcd3a375769" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-ppc64" )
|
||||||
|
require_distro "Fedora 20" || true
|
||||||
|
install_package "pypy-5.0.0-ppc64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-ppc64.tar.bz2#334a37e68cb543cf2cbcdd12379b9b770064bb70ba7fd104f1e451cfa10cdda5" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-ppc64le" )
|
||||||
|
require_distro "Fedora 21" || true
|
||||||
|
install_package "pypy-5.0.0-ppc64le" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-ppc64le.tar.bz2#e72fe5c094186f79c997000ddbaa01616def652a8d1338b75a27dfa3755eb86c" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"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-5.0.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux64.tar.bz2#b9c73be8e3c3b0835df83bdb86335712005240071cdd4dc245ac30b457063ae0" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.0-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0-linux_x86_64-portable.tar.bz2#57c9ea251bf1e7074e14aeecdd1ac8bb2fc53dbf3f90a9613d03e33076a7fa08" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"osx64" )
|
||||||
|
install_package "pypy-5.0.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-osx64.tar.bz2#45ed8bf799d0fd8eb051cbcc427173fba74dc9c2f6c309d7a3cc90f4917e6a10" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"win32" )
|
||||||
|
# FIXME: never tested on Windows
|
||||||
|
install_zip "pypy-5.0.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-win32.zip#c53f0946703f5e4885484c7cde2554a0320537135bf8965e054757c214412438" "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.0.0-src' to build from soruce."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2
plugins/python-build/share/python-build/pypy-5.0.0-src
Normal file
2
plugins/python-build/share/python-build/pypy-5.0.0-src
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
require_gcc
|
||||||
|
install_package "pypy-5.0.0-src" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-src.tar.bz2#89027b1b33553b53ff7733dc4838f0a76af23552c0d915d9f6de5875b8d7d4ab" "pypy_builder" verify_py27 ensurepip
|
||||||
44
plugins/python-build/share/python-build/pypy-5.0.1
Normal file
44
plugins/python-build/share/python-build/pypy-5.0.1
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
|
install_package "pypy-5.0.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux.tar.bz2#4b9a294033f917a1674c9ddcb2e7e8d32c4f4351f8216fd1fe23f6d2ad2b1a36" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.0.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0.1-linux_i686-portable.tar.bz2#96f1b487655c914a03f56747dfff9c20350175cae01e2911f19b1016442ed6b5" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-armel" )
|
||||||
|
require_distro "Ubuntu 12.04" || true
|
||||||
|
install_package "pypy-5.0.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux-armel.tar.bz2#17d55804b2253acd9de42276d756d4a08b7d1d2da09ef81dd325e14b18a1bcda" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-armhf" )
|
||||||
|
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||||
|
install_package "pypy-5.0.1-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux-armhf-raspbian.tar.bz2#338d1c32c1326e6321b222ae357711b38c4a0ffddf020c2a35536b5f69376e28" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
require_distro "Ubuntu 13.04" || true
|
||||||
|
install_package "pypy-5.0.1-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux-armhf-raring.tar.bz2#1e9146978cc7e7bd30683a518f304a824db7b9b1c6fae5e866eb703684ba3c98" "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-5.0.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux64.tar.bz2#1b1363a48edd1c1b31ca5e995987eda3d460a3404f36c3bb2dd9f52c93eecff5" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.0.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0.1-linux_x86_64-portable.tar.bz2#14d65f84fe8228cfa2b8e924364cf4c71e2bc6b13649098fa340baf044606436" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"osx64" )
|
||||||
|
install_package "pypy-5.0.1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-osx64.tar.bz2#6ebdb9d91203f053b38e3c21841c11a72f416dc185f7b3b7c908229df15e924a" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"win32" )
|
||||||
|
# FIXME: never tested on Windows
|
||||||
|
install_zip "pypy-5.0.1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-win32.zip#c12254d8b1747322736d26e014744a426c6900d232c1799140fbb43f44319730" "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.0.1-src' to build from soruce."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2
plugins/python-build/share/python-build/pypy-5.0.1-src
Normal file
2
plugins/python-build/share/python-build/pypy-5.0.1-src
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
require_gcc
|
||||||
|
install_package "pypy-5.0.1-src" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-src.tar.bz2#1573c9284d3ec236c8e6ef3b954753932dff29462c54b5885b761d1ee68b6e05" "pypy_builder" verify_py27 ensurepip
|
||||||
52
plugins/python-build/share/python-build/pypy-5.1
Normal file
52
plugins/python-build/share/python-build/pypy-5.1
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
if require_distro "Ubuntu 10.04" 1>/dev/null 2>&1; then
|
||||||
|
install_package "pypy-5.1.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux.tar.bz2#2f6c521b5b3c1082eab58be78655aa01ec400d19baeec93c455864a7483b8744" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.1-linux_i686-portable.tar.bz2#893507603a58b8983b69924e60591de39b8f71f70ba36d6e3894db8f7c49c3ea" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-armel" )
|
||||||
|
require_distro "Ubuntu 12.04" || true
|
||||||
|
install_package "pypy-5.1.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux-armel.tar.bz2#ea7017449ff0630431866423220c3688fc55c1a0b80a96af0ae138dd0751b81c" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-armhf" )
|
||||||
|
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||||
|
install_package "pypy-5.1.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux-armhf-raspbian.tar.bz2#3bfcd251b4f3fd1a09520b2741c647c364d16d50c82b813732a78ac60ccb2b69" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
require_distro "Ubuntu 13.04" || true
|
||||||
|
install_package "pypy-5.1.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux-armhf-raring.tar.bz2#a3e13083591bccc301fb974ff0a6c7e4ab4e611e4b31c0932898b981c794462b" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-ppc64" )
|
||||||
|
require_distro "Fedora 20" || true
|
||||||
|
install_package "pypy-5.1.0-ppc64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-ppc64.tar.bz2#32a31b9ff5174d69f8cf8db711ba2a593fed49b52bdf590bcecd6b727419b6df" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-ppc64le" )
|
||||||
|
require_distro "Fedora 21" || true
|
||||||
|
install_package "pypy-5.1.0-ppc64le" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-ppc64le.tar.bz2#303764f44154f81d7f0753258c89f8a14653658911a16ec2bcfee04055cbfab6" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"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-5.1.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux64.tar.bz2#0e8913351d043a50740b98cb89d99852b8bd6d11225a41c8abfc0baf7084cbf6" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-5.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.1-linux_x86_64-portable.tar.bz2#893507603a58b8983b69924e60591de39b8f71f70ba36d6e3894db8f7c49c3ea" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"osx64" )
|
||||||
|
install_package "pypy-5.1.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-osx64.tar.bz2#7e270c66347158dd794c101c4817f742f760ed805aa0d10abe19ba4a78a75118" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"win32" )
|
||||||
|
# FIXME: never tested on Windows
|
||||||
|
install_zip "pypy-5.1.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-win32.zip#044e7f35223a443412b5948740e60e93069a6f8b0a72053cc9d472874bb1b6cc" "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.1.0-src' to build from soruce."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2
plugins/python-build/share/python-build/pypy-5.1-src
Normal file
2
plugins/python-build/share/python-build/pypy-5.1-src
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
require_gcc
|
||||||
|
install_package "pypy-5.1.0-src" "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-src.tar.bz2#16bab9501e942c0704abbf9cd6c4e950c6a76dc226cf1e447ea084916aef4714" "pypy_builder" verify_py27 ensurepip
|
||||||
16
plugins/python-build/share/python-build/pypy-portable-5.0
Normal file
16
plugins/python-build/share/python-build/pypy-portable-5.0
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
install_package "pypy-5.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0-linux_i686-portable.tar.bz2#316e03afdd2f6212857789933c01f0d41a1665c80d28526c0fb4082b6d3f4f60" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux64" )
|
||||||
|
install_package "pypy-5.0-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0-linux_x86_64-portable.tar.bz2#57c9ea251bf1e7074e14aeecdd1ac8bb2fc53dbf3f90a9613d03e33076a7fa08" "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-5.0.1
Normal file
16
plugins/python-build/share/python-build/pypy-portable-5.0.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
install_package "pypy-5.0.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0.1-linux_i686-portable.tar.bz2#96f1b487655c914a03f56747dfff9c20350175cae01e2911f19b1016442ed6b5" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux64" )
|
||||||
|
install_package "pypy-5.0.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.0.1-linux_x86_64-portable.tar.bz2#14d65f84fe8228cfa2b8e924364cf4c71e2bc6b13649098fa340baf044606436" "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-5.1
Normal file
16
plugins/python-build/share/python-build/pypy-portable-5.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
install_package "pypy-5.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.1-linux_i686-portable.tar.bz2#893507603a58b8983b69924e60591de39b8f71f70ba36d6e3894db8f7c49c3ea" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux64" )
|
||||||
|
install_package "pypy-5.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.1-linux_x86_64-portable.tar.bz2#b2df9b0127457d1c3cc0dc9b8f027a53569ccd3ba5a79012d641e576d9cc003a" "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
|
||||||
@@ -101,6 +101,11 @@ EOS
|
|||||||
## xsltproc
|
## xsltproc
|
||||||
cat <<EOS
|
cat <<EOS
|
||||||
xsltproc
|
xsltproc
|
||||||
|
EOS
|
||||||
|
|
||||||
|
# xz-utils
|
||||||
|
cat <<EOS
|
||||||
|
xz
|
||||||
EOS
|
EOS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,13 @@
|
|||||||
|
|
||||||
load test_helper
|
load test_helper
|
||||||
|
|
||||||
|
export GIT_DIR="${PYENV_TEST_DIR}/.git"
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
mkdir -p "$HOME"
|
mkdir -p "$HOME"
|
||||||
git config --global user.name "Tester"
|
git config --global user.name "Tester"
|
||||||
git config --global user.email "tester@test.local"
|
git config --global user.email "tester@test.local"
|
||||||
|
cd "$PYENV_TEST_DIR"
|
||||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
|
||||||
cat > "${PYENV_TEST_DIR}/bin/git" <<CMD
|
|
||||||
#!$BASH
|
|
||||||
if [[ \$1 == remote && \$PWD != "\$PYENV_TEST_DIR"/* ]]; then
|
|
||||||
echo "not allowed" >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exec $(which git) "\$@"
|
|
||||||
fi
|
|
||||||
CMD
|
|
||||||
chmod +x "${PYENV_TEST_DIR}/bin/git"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
git_commit() {
|
git_commit() {
|
||||||
@@ -32,22 +23,17 @@ git_commit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "doesn't read version from non-pyenv repo" {
|
@test "doesn't read version from non-pyenv repo" {
|
||||||
mkdir -p "$PYENV_ROOT"
|
|
||||||
cd "$PYENV_ROOT"
|
|
||||||
git init
|
git init
|
||||||
git remote add origin https://github.com/homebrew/homebrew.git
|
git remote add origin https://github.com/homebrew/homebrew.git
|
||||||
git_commit
|
git_commit
|
||||||
git tag v1.0
|
git tag v1.0
|
||||||
|
|
||||||
cd "$PYENV_TEST_DIR"
|
|
||||||
run pyenv---version
|
run pyenv---version
|
||||||
assert_success
|
assert_success
|
||||||
[[ $output == "pyenv 20"* ]]
|
[[ $output == "pyenv 20"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "reads version from git repo" {
|
@test "reads version from git repo" {
|
||||||
mkdir -p "$PYENV_ROOT"
|
|
||||||
cd "$PYENV_ROOT"
|
|
||||||
git init
|
git init
|
||||||
git remote add origin https://github.com/yyuu/pyenv.git
|
git remote add origin https://github.com/yyuu/pyenv.git
|
||||||
git_commit
|
git_commit
|
||||||
@@ -55,20 +41,15 @@ git_commit() {
|
|||||||
git_commit
|
git_commit
|
||||||
git_commit
|
git_commit
|
||||||
|
|
||||||
cd "$PYENV_TEST_DIR"
|
|
||||||
run pyenv---version
|
run pyenv---version
|
||||||
assert_success
|
assert_success "pyenv 20380119-2-g$(git rev-parse --short HEAD)"
|
||||||
[[ $output == "pyenv 20380119-2-g"* ]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "prints default version if no tags in git repo" {
|
@test "prints default version if no tags in git repo" {
|
||||||
mkdir -p "$PYENV_ROOT"
|
|
||||||
cd "$PYENV_ROOT"
|
|
||||||
git init
|
git init
|
||||||
git remote add origin https://github.com/yyuu/pyenv.git
|
git remote add origin https://github.com/yyuu/pyenv.git
|
||||||
git_commit
|
git_commit
|
||||||
|
|
||||||
cd "$PYENV_TEST_DIR"
|
|
||||||
run pyenv---version
|
run pyenv---version
|
||||||
[[ $output == "pyenv 20"* ]]
|
[[ $output == "pyenv 20"* ]]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,27 +43,14 @@ python
|
|||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "supports hook path with spaces" {
|
|
||||||
hook_path="${PYENV_TEST_DIR}/custom stuff/pyenv hooks"
|
|
||||||
mkdir -p "${hook_path}/exec"
|
|
||||||
echo "export HELLO='from hook'" > "${hook_path}/exec/hello.bash"
|
|
||||||
|
|
||||||
export PYENV_VERSION=system
|
|
||||||
PYENV_HOOK_PATH="$hook_path" run pyenv-exec env
|
|
||||||
assert_success
|
|
||||||
assert_line "HELLO=from hook"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "carries original IFS within hooks" {
|
@test "carries original IFS within hooks" {
|
||||||
hook_path="${PYENV_TEST_DIR}/pyenv.d"
|
create_hook exec hello.bash <<SH
|
||||||
mkdir -p "${hook_path}/exec"
|
|
||||||
cat > "${hook_path}/exec/hello.bash" <<SH
|
|
||||||
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
||||||
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
||||||
SH
|
SH
|
||||||
|
|
||||||
export PYENV_VERSION=system
|
export PYENV_VERSION=system
|
||||||
PYENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run pyenv-exec env
|
IFS=$' \t\n' run pyenv-exec env
|
||||||
assert_success
|
assert_success
|
||||||
assert_line "HELLO=:hello:ugly:world:again"
|
assert_line "HELLO=:hello:ugly:world:again"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
load test_helper
|
load test_helper
|
||||||
|
|
||||||
@test "default" {
|
@test "default" {
|
||||||
run pyenv global
|
run pyenv-global
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "system"
|
assert_output "system"
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ load test_helper
|
|||||||
mkdir -p "$PYENV_ROOT/versions/1.2.3"
|
mkdir -p "$PYENV_ROOT/versions/1.2.3"
|
||||||
run pyenv-global "1.2.3"
|
run pyenv-global "1.2.3"
|
||||||
assert_success
|
assert_success
|
||||||
run pyenv global
|
run pyenv-global
|
||||||
assert_success "1.2.3"
|
assert_success "1.2.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
load test_helper
|
load test_helper
|
||||||
|
|
||||||
create_hook() {
|
|
||||||
mkdir -p "$1/$2"
|
|
||||||
touch "$1/$2/$3"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "prints usage help given no argument" {
|
@test "prints usage help given no argument" {
|
||||||
run pyenv-hooks
|
run pyenv-hooks
|
||||||
assert_failure "Usage: pyenv hooks <command>"
|
assert_failure "Usage: pyenv hooks <command>"
|
||||||
@@ -15,11 +10,13 @@ create_hook() {
|
|||||||
@test "prints list of hooks" {
|
@test "prints list of hooks" {
|
||||||
path1="${PYENV_TEST_DIR}/pyenv.d"
|
path1="${PYENV_TEST_DIR}/pyenv.d"
|
||||||
path2="${PYENV_TEST_DIR}/etc/pyenv_hooks"
|
path2="${PYENV_TEST_DIR}/etc/pyenv_hooks"
|
||||||
create_hook "$path1" exec "hello.bash"
|
PYENV_HOOK_PATH="$path1"
|
||||||
create_hook "$path1" exec "ahoy.bash"
|
create_hook exec "hello.bash"
|
||||||
create_hook "$path1" exec "invalid.sh"
|
create_hook exec "ahoy.bash"
|
||||||
create_hook "$path1" which "boom.bash"
|
create_hook exec "invalid.sh"
|
||||||
create_hook "$path2" exec "bueno.bash"
|
create_hook which "boom.bash"
|
||||||
|
PYENV_HOOK_PATH="$path2"
|
||||||
|
create_hook exec "bueno.bash"
|
||||||
|
|
||||||
PYENV_HOOK_PATH="$path1:$path2" run pyenv-hooks exec
|
PYENV_HOOK_PATH="$path1:$path2" run pyenv-hooks exec
|
||||||
assert_success
|
assert_success
|
||||||
@@ -33,8 +30,10 @@ OUT
|
|||||||
@test "supports hook paths with spaces" {
|
@test "supports hook paths with spaces" {
|
||||||
path1="${PYENV_TEST_DIR}/my hooks/pyenv.d"
|
path1="${PYENV_TEST_DIR}/my hooks/pyenv.d"
|
||||||
path2="${PYENV_TEST_DIR}/etc/pyenv hooks"
|
path2="${PYENV_TEST_DIR}/etc/pyenv hooks"
|
||||||
create_hook "$path1" exec "hello.bash"
|
PYENV_HOOK_PATH="$path1"
|
||||||
create_hook "$path2" exec "ahoy.bash"
|
create_hook exec "hello.bash"
|
||||||
|
PYENV_HOOK_PATH="$path2"
|
||||||
|
create_hook exec "ahoy.bash"
|
||||||
|
|
||||||
PYENV_HOOK_PATH="$path1:$path2" run pyenv-hooks exec
|
PYENV_HOOK_PATH="$path1:$path2" run pyenv-hooks exec
|
||||||
assert_success
|
assert_success
|
||||||
@@ -45,8 +44,8 @@ OUT
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "resolves relative paths" {
|
@test "resolves relative paths" {
|
||||||
path="${PYENV_TEST_DIR}/pyenv.d"
|
PYENV_HOOK_PATH="${PYENV_TEST_DIR}/pyenv.d"
|
||||||
create_hook "$path" exec "hello.bash"
|
create_hook exec "hello.bash"
|
||||||
mkdir -p "$HOME"
|
mkdir -p "$HOME"
|
||||||
|
|
||||||
PYENV_HOOK_PATH="${HOME}/../pyenv.d" run pyenv-hooks exec
|
PYENV_HOOK_PATH="${HOME}/../pyenv.d" run pyenv-hooks exec
|
||||||
|
|||||||
@@ -25,12 +25,24 @@ load test_helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "detect parent shell" {
|
@test "detect parent shell" {
|
||||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
|
||||||
SHELL=/bin/false run pyenv-init -
|
SHELL=/bin/false run pyenv-init -
|
||||||
assert_success
|
assert_success
|
||||||
assert_line "export PYENV_SHELL=bash"
|
assert_line "export PYENV_SHELL=bash"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "detect parent shell from script" {
|
||||||
|
mkdir -p "$PYENV_TEST_DIR"
|
||||||
|
cd "$PYENV_TEST_DIR"
|
||||||
|
cat > myscript.sh <<OUT
|
||||||
|
#!/bin/sh
|
||||||
|
eval "\$(pyenv-init -)"
|
||||||
|
echo \$PYENV_SHELL
|
||||||
|
OUT
|
||||||
|
chmod +x myscript.sh
|
||||||
|
run ./myscript.sh /bin/zsh
|
||||||
|
assert_success "sh"
|
||||||
|
}
|
||||||
|
|
||||||
@test "setup shell completions (fish)" {
|
@test "setup shell completions (fish)" {
|
||||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||||
run pyenv-init - fish
|
run pyenv-init - fish
|
||||||
|
|||||||
@@ -19,24 +19,11 @@ setup() {
|
|||||||
assert_success "1.2.3"
|
assert_success "1.2.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "supports legacy .pyenv-version file" {
|
@test "discovers version file in parent directory" {
|
||||||
echo "1.2.3" > .pyenv-version
|
|
||||||
run pyenv-local
|
|
||||||
assert_success "1.2.3"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "local .python-version has precedence over .pyenv-version" {
|
|
||||||
echo "2.7" > .pyenv-version
|
|
||||||
echo "3.4" > .python-version
|
|
||||||
run pyenv-local
|
|
||||||
assert_success "3.4"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "ignores version in parent directory" {
|
|
||||||
echo "1.2.3" > .python-version
|
echo "1.2.3" > .python-version
|
||||||
mkdir -p "subdir" && cd "subdir"
|
mkdir -p "subdir" && cd "subdir"
|
||||||
run pyenv-local
|
run pyenv-local
|
||||||
assert_failure
|
assert_success "1.2.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "ignores PYENV_DIR" {
|
@test "ignores PYENV_DIR" {
|
||||||
@@ -64,40 +51,9 @@ setup() {
|
|||||||
assert [ "$(cat .python-version)" = "1.2.3" ]
|
assert [ "$(cat .python-version)" = "1.2.3" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "renames .pyenv-version to .python-version" {
|
|
||||||
echo "2.7.6" > .pyenv-version
|
|
||||||
mkdir -p "${PYENV_ROOT}/versions/3.3.3"
|
|
||||||
run pyenv-local
|
|
||||||
assert_success "2.7.6"
|
|
||||||
run pyenv-local "3.3.3"
|
|
||||||
assert_success
|
|
||||||
assert_output <<OUT
|
|
||||||
pyenv: removed existing \`.pyenv-version' file and migrated
|
|
||||||
local version specification to \`.python-version' file
|
|
||||||
OUT
|
|
||||||
assert [ ! -e .pyenv-version ]
|
|
||||||
assert [ "$(cat .python-version)" = "3.3.3" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "doesn't rename .pyenv-version if changing the version failed" {
|
|
||||||
echo "2.7.6" > .pyenv-version
|
|
||||||
assert [ ! -e "${PYENV_ROOT}/versions/3.3.3" ]
|
|
||||||
run pyenv-local "3.3.3"
|
|
||||||
assert_failure "pyenv: version \`3.3.3' not installed"
|
|
||||||
assert [ ! -e .python-version ]
|
|
||||||
assert [ "$(cat .pyenv-version)" = "2.7.6" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "unsets local version" {
|
@test "unsets local version" {
|
||||||
touch .python-version
|
touch .python-version
|
||||||
run pyenv-local --unset
|
run pyenv-local --unset
|
||||||
assert_success ""
|
assert_success ""
|
||||||
assert [ ! -e .pyenv-version ]
|
assert [ ! -e .python-version ]
|
||||||
}
|
|
||||||
|
|
||||||
@test "unsets alternate version file" {
|
|
||||||
touch .pyenv-version
|
|
||||||
run pyenv-local --unset
|
|
||||||
assert_success ""
|
|
||||||
assert [ ! -e .pyenv-version ]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ load test_helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "PYENV_HOOK_PATH includes pyenv built-in plugins" {
|
@test "PYENV_HOOK_PATH includes pyenv built-in plugins" {
|
||||||
|
unset PYENV_HOOK_PATH
|
||||||
run pyenv echo "PYENV_HOOK_PATH"
|
run pyenv echo "PYENV_HOOK_PATH"
|
||||||
assert_success ":${PYENV_ROOT}/pyenv.d:${BATS_TEST_DIRNAME%/*}/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks"
|
assert_success "${PYENV_ROOT}/pyenv.d:${BATS_TEST_DIRNAME%/*}/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,15 +86,13 @@ OUT
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "carries original IFS within hooks" {
|
@test "carries original IFS within hooks" {
|
||||||
hook_path="${PYENV_TEST_DIR}/pyenv.d"
|
create_hook rehash hello.bash <<SH
|
||||||
mkdir -p "${hook_path}/rehash"
|
|
||||||
cat > "${hook_path}/rehash/hello.bash" <<SH
|
|
||||||
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
||||||
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
||||||
exit
|
exit
|
||||||
SH
|
SH
|
||||||
|
|
||||||
PYENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run pyenv-rehash
|
IFS=$' \t\n' run pyenv-rehash
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "HELLO=:hello:ugly:world:again"
|
assert_output "HELLO=:hello:ugly:world:again"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ if [ -z "$PYENV_TEST_DIR" ]; then
|
|||||||
|
|
||||||
export PYENV_ROOT="${PYENV_TEST_DIR}/root"
|
export PYENV_ROOT="${PYENV_TEST_DIR}/root"
|
||||||
export HOME="${PYENV_TEST_DIR}/home"
|
export HOME="${PYENV_TEST_DIR}/home"
|
||||||
|
export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d"
|
||||||
|
|
||||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||||
PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
||||||
@@ -129,3 +130,11 @@ path_without() {
|
|||||||
path="${path#:}"
|
path="${path#:}"
|
||||||
echo "${path%:}"
|
echo "${path%:}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_hook() {
|
||||||
|
mkdir -p "${PYENV_HOOK_PATH}/$1"
|
||||||
|
touch "${PYENV_HOOK_PATH}/$1/$2"
|
||||||
|
if [ ! -t 0 ]; then
|
||||||
|
cat > "${PYENV_HOOK_PATH}/$1/$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ create_file() {
|
|||||||
touch "$1"
|
touch "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "detects global 'version' file" {
|
||||||
|
create_file "${PYENV_ROOT}/version"
|
||||||
|
run pyenv-version-file
|
||||||
|
assert_success "${PYENV_ROOT}/version"
|
||||||
|
}
|
||||||
|
|
||||||
@test "prints global file if no version files exist" {
|
@test "prints global file if no version files exist" {
|
||||||
assert [ ! -e "${PYENV_ROOT}/version" ]
|
assert [ ! -e "${PYENV_ROOT}/version" ]
|
||||||
assert [ ! -e ".python-version" ]
|
assert [ ! -e ".python-version" ]
|
||||||
@@ -19,45 +25,12 @@ create_file() {
|
|||||||
assert_success "${PYENV_ROOT}/version"
|
assert_success "${PYENV_ROOT}/version"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "detects 'global' file" {
|
|
||||||
create_file "${PYENV_ROOT}/global"
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_ROOT}/global"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "detects 'default' file" {
|
|
||||||
create_file "${PYENV_ROOT}/default"
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_ROOT}/default"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "'version' has precedence over 'global' and 'default'" {
|
|
||||||
create_file "${PYENV_ROOT}/version"
|
|
||||||
create_file "${PYENV_ROOT}/global"
|
|
||||||
create_file "${PYENV_ROOT}/default"
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_ROOT}/version"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "in current directory" {
|
@test "in current directory" {
|
||||||
create_file ".python-version"
|
create_file ".python-version"
|
||||||
run pyenv-version-file
|
run pyenv-version-file
|
||||||
assert_success "${PYENV_TEST_DIR}/.python-version"
|
assert_success "${PYENV_TEST_DIR}/.python-version"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "legacy file in current directory" {
|
|
||||||
create_file ".pyenv-version"
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_TEST_DIR}/.pyenv-version"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test ".python-version has precedence over legacy file" {
|
|
||||||
create_file ".python-version"
|
|
||||||
create_file ".pyenv-version"
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_TEST_DIR}/.python-version"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "in parent directory" {
|
@test "in parent directory" {
|
||||||
create_file ".python-version"
|
create_file ".python-version"
|
||||||
mkdir -p project
|
mkdir -p project
|
||||||
@@ -74,14 +47,6 @@ create_file() {
|
|||||||
assert_success "${PYENV_TEST_DIR}/project/.python-version"
|
assert_success "${PYENV_TEST_DIR}/project/.python-version"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "legacy file has precedence if higher" {
|
|
||||||
create_file ".python-version"
|
|
||||||
create_file "project/.pyenv-version"
|
|
||||||
cd project
|
|
||||||
run pyenv-version-file
|
|
||||||
assert_success "${PYENV_TEST_DIR}/project/.pyenv-version"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "PYENV_DIR has precedence over PWD" {
|
@test "PYENV_DIR has precedence over PWD" {
|
||||||
create_file "widget/.python-version"
|
create_file "widget/.python-version"
|
||||||
create_file "project/.python-version"
|
create_file "project/.python-version"
|
||||||
@@ -97,3 +62,14 @@ create_file() {
|
|||||||
PYENV_DIR="${PYENV_TEST_DIR}/widget/blank" run pyenv-version-file
|
PYENV_DIR="${PYENV_TEST_DIR}/widget/blank" run pyenv-version-file
|
||||||
assert_success "${PYENV_TEST_DIR}/project/.python-version"
|
assert_success "${PYENV_TEST_DIR}/project/.python-version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "finds version file in target directory" {
|
||||||
|
create_file "project/.python-version"
|
||||||
|
run pyenv-version-file "${PWD}/project"
|
||||||
|
assert_success "${PYENV_TEST_DIR}/project/.python-version"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "fails when no version file in target directory" {
|
||||||
|
run pyenv-version-file "$PWD"
|
||||||
|
assert_failure ""
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,29 +22,50 @@ setup() {
|
|||||||
assert_success "system"
|
assert_success "system"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "PYENV_VERSION can be overridden by hook" {
|
||||||
|
create_version "2.7.11"
|
||||||
|
create_version "3.5.1"
|
||||||
|
create_hook version-name test.bash <<<"PYENV_VERSION=3.5.1"
|
||||||
|
|
||||||
|
PYENV_VERSION=2.7.11 run pyenv-version-name
|
||||||
|
assert_success "3.5.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "carries original IFS within hooks" {
|
||||||
|
create_hook version-name hello.bash <<SH
|
||||||
|
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
||||||
|
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
||||||
|
SH
|
||||||
|
|
||||||
|
export PYENV_VERSION=system
|
||||||
|
IFS=$' \t\n' run pyenv-version-name env
|
||||||
|
assert_success
|
||||||
|
assert_line "HELLO=:hello:ugly:world:again"
|
||||||
|
}
|
||||||
|
|
||||||
@test "PYENV_VERSION has precedence over local" {
|
@test "PYENV_VERSION has precedence over local" {
|
||||||
create_version "2.7.6"
|
create_version "2.7.11"
|
||||||
create_version "3.3.3"
|
create_version "3.5.1"
|
||||||
|
|
||||||
cat > ".python-version" <<<"2.7.6"
|
cat > ".python-version" <<<"2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "2.7.6"
|
assert_success "2.7.11"
|
||||||
|
|
||||||
PYENV_VERSION=3.3.3 run pyenv-version-name
|
PYENV_VERSION=3.5.1 run pyenv-version-name
|
||||||
assert_success "3.3.3"
|
assert_success "3.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "local file has precedence over global" {
|
@test "local file has precedence over global" {
|
||||||
create_version "2.7.6"
|
create_version "2.7.11"
|
||||||
create_version "3.3.3"
|
create_version "3.5.1"
|
||||||
|
|
||||||
cat > "${PYENV_ROOT}/version" <<<"2.7.6"
|
cat > "${PYENV_ROOT}/version" <<<"2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "2.7.6"
|
assert_success "2.7.11"
|
||||||
|
|
||||||
cat > ".python-version" <<<"3.3.3"
|
cat > ".python-version" <<<"3.5.1"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "3.3.3"
|
assert_success "3.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "missing version" {
|
@test "missing version" {
|
||||||
@@ -53,22 +74,22 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (second missing)" {
|
@test "one missing version (second missing)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="3.4.2:1.2" run pyenv-version-name
|
PYENV_VERSION="3.5.1:1.2" run pyenv-version-name
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (first missing)" {
|
@test "one missing version (first missing)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name
|
PYENV_VERSION="1.2:3.5.1" run pyenv-version-name
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,18 +98,18 @@ pyenv-version-name-without-stderr() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (without stderr)" {
|
@test "one missing version (without stderr)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name-without-stderr
|
PYENV_VERSION="1.2:3.5.1" run pyenv-version-name-without-stderr
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "version with prefix in name" {
|
@test "version with prefix in name" {
|
||||||
create_version "2.7.6"
|
create_version "2.7.11"
|
||||||
cat > ".python-version" <<<"python-2.7.6"
|
cat > ".python-version" <<<"python-2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "2.7.6"
|
assert_output "2.7.11"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,26 @@ setup() {
|
|||||||
assert_success "${PWD}/.python-version"
|
assert_success "${PWD}/.python-version"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "detects alternate version file" {
|
@test "reports from hook" {
|
||||||
touch .pyenv-version
|
create_hook version-origin test.bash <<<"PYENV_VERSION_ORIGIN=plugin"
|
||||||
run pyenv-version-origin
|
|
||||||
assert_success "${PWD}/.pyenv-version"
|
PYENV_VERSION=1 run pyenv-version-origin
|
||||||
|
assert_success "plugin"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "carries original IFS within hooks" {
|
||||||
|
create_hook version-origin hello.bash <<SH
|
||||||
|
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
||||||
|
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
||||||
|
SH
|
||||||
|
|
||||||
|
export PYENV_VERSION=system
|
||||||
|
IFS=$' \t\n' run pyenv-version-origin env
|
||||||
|
assert_success
|
||||||
|
assert_line "HELLO=:hello:ugly:world:again"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "doesn't inherit PYENV_VERSION_ORIGIN from environment" {
|
||||||
|
PYENV_VERSION_ORIGIN=ignored run pyenv-version-origin
|
||||||
|
assert_success "${PYENV_ROOT}/version"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,15 +113,13 @@ OUT
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "carries original IFS within hooks" {
|
@test "carries original IFS within hooks" {
|
||||||
hook_path="${PYENV_TEST_DIR}/pyenv.d"
|
create_hook which hello.bash <<SH
|
||||||
mkdir -p "${hook_path}/which"
|
|
||||||
cat > "${hook_path}/which/hello.bash" <<SH
|
|
||||||
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
hellos=(\$(printf "hello\\tugly world\\nagain"))
|
||||||
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
||||||
exit
|
exit
|
||||||
SH
|
SH
|
||||||
|
|
||||||
PYENV_HOOK_PATH="$hook_path" IFS=$' \t\n' PYENV_VERSION=system run pyenv-which anything
|
IFS=$' \t\n' PYENV_VERSION=system run pyenv-which anything
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "HELLO=:hello:ugly:world:again"
|
assert_output "HELLO=:hello:ugly:world:again"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user