Compare commits

..

No commits in common. "master" and "v2.6.26" have entirely different histories.

7 changed files with 40 additions and 47 deletions

View File

@ -41,7 +41,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens # https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
- name: Generate Github token - name: Generate Github token
if: env.rc == 0 if: env.rc == 0
uses: actions/create-github-app-token@v3 uses: actions/create-github-app-token@v2
id: generate-token id: generate-token
with: with:
app-id: ${{ vars.PYENV_BOT_APP_ID }} app-id: ${{ vars.PYENV_BOT_APP_ID }}

View File

@ -40,8 +40,9 @@ Lists all available pyenv commands.
Sets a local application-specific Python version by writing the version Sets a local application-specific Python version by writing the version
name to a `.python-version` file in the current directory. This version name to a `.python-version` file in the current directory. This version
overrides the [global version](#pyenv-global), and can be overridden overrides the global version, and can be overridden itself by setting
itself with the [`pyenv shell`](#pyenv-shell) command. the `PYENV_VERSION` environment variable or with the `pyenv shell`
command.
$ pyenv local 2.7.6 $ pyenv local 2.7.6
@ -97,8 +98,9 @@ This is mainly useful in special cases like provisioning scripts.
## `pyenv global` ## `pyenv global`
Sets the global version of Python to be used in all shells by writing Sets the global version of Python to be used in all shells by writing
the version name to the `$PYENV_ROOT/version` file. This version can be the version name to the `~/.pyenv/version` file. This version can be
overridden with [`pyenv local`](#pyenv-local) or [`pyenv shell`](#pyenv-shell). overridden by an application-specific `.python-version` file, or by
setting the `PYENV_VERSION` environment variable.
$ pyenv global 2.7.6 $ pyenv global 2.7.6
@ -234,7 +236,6 @@ Then install the desired versions:
You can also install the latest version of Python in a specific version line by supplying a prefix instead of a complete name: You can also install the latest version of Python in a specific version line by supplying a prefix instead of a complete name:
$ pyenv install 3.10 $ pyenv install 3.10
$ pyenv install 3
See the [`pyenv latest` documentation](#pyenv-latest) for details on prefix resolution. See the [`pyenv latest` documentation](#pyenv-latest) for details on prefix resolution.
@ -242,6 +243,9 @@ An older option is to use the `:latest` syntax. For example, to install the late
pyenv install 3.8:latest pyenv install 3.8:latest
To install the latest major release for Python 3 try:
pyenv install 3:latest
## `pyenv uninstall` ## `pyenv uninstall`
@ -348,9 +352,10 @@ locations of the currently selected versions.
Displays the latest installed or known version with the given prefix Displays the latest installed or known version with the given prefix
Usage: pyenv latest [-k|--known] <prefix> Usage: pyenv latest [-k|--known] [-q|--quiet] <prefix>
-k/--known Select from all known versions instead of installed -k/--known Select from all known versions instead of installed
-q/--quiet Do not print an error message on resolution failure
Only full prefixes are searched: in the actual name, the given prefix must be followed by a dot or a dash. Only full prefixes are searched: in the actual name, the given prefix must be followed by a dot or a dash.

View File

@ -407,7 +407,7 @@ of the following commands:
* [`pyenv shell <version>`](COMMANDS.md#pyenv-shell) -- select just for current shell session * [`pyenv shell <version>`](COMMANDS.md#pyenv-shell) -- select just for current shell session
* [`pyenv local <version>`](COMMANDS.md#pyenv-local) -- automatically select whenever you are in the current directory (or its subdirectories) * [`pyenv local <version>`](COMMANDS.md#pyenv-local) -- automatically select whenever you are in the current directory (or its subdirectories)
* [`pyenv global <version>`](COMMANDS.md#pyenv-global) -- select globally for your user account * [`pyenv global <version>`](COMMANDS.md#pyenv-shell) -- select globally for your user account
E.g. to select the above-mentioned newly-installed Python 3.10.4 as your preferred version to use: E.g. to select the above-mentioned newly-installed Python 3.10.4 as your preferred version to use:

View File

@ -3,19 +3,19 @@
# Usage: pyenv commands [--sh|--no-sh] # Usage: pyenv commands [--sh|--no-sh]
set -e set -e
[[ -n $PYENV_DEBUG ]] && set -x [ -n "$PYENV_DEBUG" ] && set -x
# Provide pyenv completions # Provide pyenv completions
if [[ $1 = "--complete" ]]; then if [ "$1" = "--complete" ]; then
echo --sh echo --sh
echo --no-sh echo --no-sh
exit exit
fi fi
if [[ $1 = "--sh" ]]; then if [ "$1" = "--sh" ]; then
sh=1 sh=1
shift shift
elif [[ $1 = "--no-sh" ]]; then elif [ "$1" = "--no-sh" ]; then
nosh=1 nosh=1
shift shift
fi fi
@ -24,25 +24,20 @@ IFS=: paths=($PATH)
shopt -s nullglob shopt -s nullglob
{ { for path in "${paths[@]}"; do
if [[ -n $sh ]]; then for command in "${path}/pyenv-"*; do
for path in "${paths[@]}"; do command="${command##*pyenv-}"
for command in "${path}"/pyenv-sh-*; do if [ -n "$sh" ]; then
echo "${command##*/pyenv-sh-}" if [ "${command:0:3}" = "sh-" ]; then
done echo "${command##sh-}"
done fi
else elif [ -n "$nosh" ]; then
for path in "${paths[@]}"; do if [ "${command:0:3}" != "sh-" ]; then
for command in "${path}"/pyenv-*; do echo "${command##sh-}"
command="${command##*/pyenv-}"
if [[ -n $nosh ]]; then
if [[ ${command:0:3} != "sh-" ]]; then
echo "$command"
fi fi
else else
echo "${command##sh-}" echo "${command##sh-}"
fi fi
done done
done done
fi } | sort | uniq
} | sort -u

View File

@ -112,8 +112,8 @@ else
echo "The \`$PYENV_COMMAND' command exists in these Python versions:" echo "The \`$PYENV_COMMAND' command exists in these Python versions:"
echo "$versions" | sed 's/^/ /g' echo "$versions" | sed 's/^/ /g'
echo echo
echo "Note: See 'pyenv help global' for tips on allowing multiple" echo "Note: See 'pyenv help global' for tips on allowing both"
echo " Python versions to be found at the same time." echo " python2 and python3 to be found."
} >&2 } >&2
fi fi
fi fi

View File

@ -202,14 +202,7 @@ build_failed() {
colorize 33 "Results logged to ${LOG_PATH}" colorize 33 "Results logged to ${LOG_PATH}"
printf "\n\n" printf "\n\n"
echo "Last 10 log lines:" echo "Last 10 log lines:"
TAIL=`tail -n 10 "$LOG_PATH"` tail -n 10 "$LOG_PATH"
echo "$TAIL"
if echo "$TAIL" | grep -q "no acceptable C compiler found"; then
printf "\n"
echo "Are the build dependencies for Python correctly installed?"
echo "Please consult to the Wiki page for more info."
echo "https://github.com/pyenv/pyenv/wiki#suggested-build-environment"
fi
fi fi
} >&3 } >&3
exit 1 exit 1

View File

@ -68,8 +68,8 @@ pyenv: py.test: command not found
The \`py.test' command exists in these Python versions: The \`py.test' command exists in these Python versions:
3.4 3.4
Note: See 'pyenv help global' for tips on allowing multiple Note: See 'pyenv help global' for tips on allowing both
Python versions to be found at the same time. python2 and python3 to be found.
OUT OUT
} }
@ -85,8 +85,8 @@ pyenv: py.test: command not found
The \`py.test' command exists in these Python versions: The \`py.test' command exists in these Python versions:
3.4 3.4
Note: See 'pyenv help global' for tips on allowing multiple Note: See 'pyenv help global' for tips on allowing both
Python versions to be found at the same time. python2 and python3 to be found.
OUT OUT
} }
@ -118,8 +118,8 @@ The \`py.test' command exists in these Python versions:
3.3 3.3
3.4 3.4
Note: See 'pyenv help global' for tips on allowing multiple Note: See 'pyenv help global' for tips on allowing both
Python versions to be found at the same time. python2 and python3 to be found.
OUT OUT
} }