Compare commits

...

7 Commits

Author SHA1 Message Date
exurd
ce491008e7
python-build: advise user with no c compiler (#3294)
this checks if "no acceptable C compiler found" is in the last 10 lines of the log, and asks if the user has correctly installed the build dependencies.
2026-04-01 21:32:48 +03:00
dependabot[bot]
d26308df49
Bump actions/create-github-app-token in the github-actions group (#3428)
Bumps the github-actions group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `actions/create-github-app-token` from 2 to 3
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 09:31:31 +03:00
Ivan Pozdeev
8397a19c64
- outdated info
[no ci]
2026-03-24 09:05:13 +03:00
Ivan Pozdeev
0d71a264c2
Fix factual errors; highlight pyenv install 3
Closes #3427
[no ci]
2026-03-23 18:12:11 +03:00
Ivan Pozdeev
a6521a0d35
Fix link
[no ci]
2026-03-23 17:05:57 +03:00
native-api
044d816d35
which: update pyenv help global tip (#3424) 2026-03-14 11:23:19 +03:00
Jake Lodwick
6a246fad63
commands: fast path for --sh, replace sort|uniq with sort -u (#3423) 2026-03-13 13:56:23 +03:00
7 changed files with 49 additions and 42 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@v2 uses: actions/create-github-app-token@v3
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,9 +40,8 @@ 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, and can be overridden itself by setting overrides the [global version](#pyenv-global), and can be overridden
the `PYENV_VERSION` environment variable or with the `pyenv shell` itself with the [`pyenv shell`](#pyenv-shell) command.
command.
$ pyenv local 2.7.6 $ pyenv local 2.7.6
@ -98,9 +97,8 @@ 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/version` file. This version can be the version name to the `$PYENV_ROOT/version` file. This version can be
overridden by an application-specific `.python-version` file, or by overridden with [`pyenv local`](#pyenv-local) or [`pyenv shell`](#pyenv-shell).
setting the `PYENV_VERSION` environment variable.
$ pyenv global 2.7.6 $ pyenv global 2.7.6
@ -236,6 +234,7 @@ 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.
@ -243,9 +242,6 @@ 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`
@ -352,10 +348,9 @@ 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] [-q|--quiet] <prefix> Usage: pyenv latest [-k|--known] <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-shell) -- select globally for your user account * [`pyenv global <version>`](COMMANDS.md#pyenv-global) -- 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,20 +24,25 @@ IFS=: paths=($PATH)
shopt -s nullglob shopt -s nullglob
{ for path in "${paths[@]}"; do {
for command in "${path}/pyenv-"*; do if [[ -n $sh ]]; then
command="${command##*pyenv-}" for path in "${paths[@]}"; do
if [ -n "$sh" ]; then for command in "${path}"/pyenv-sh-*; do
if [ "${command:0:3}" = "sh-" ]; then echo "${command##*/pyenv-sh-}"
echo "${command##sh-}" done
fi done
elif [ -n "$nosh" ]; then else
if [ "${command:0:3}" != "sh-" ]; then for path in "${paths[@]}"; do
echo "${command##sh-}" for command in "${path}"/pyenv-*; do
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
} | sort | uniq fi
} | 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 both" echo "Note: See 'pyenv help global' for tips on allowing multiple"
echo " python2 and python3 to be found." echo " Python versions to be found at the same time."
} >&2 } >&2
fi fi
fi fi

View File

@ -202,7 +202,14 @@ 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 -n 10 "$LOG_PATH" TAIL=`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 both Note: See 'pyenv help global' for tips on allowing multiple
python2 and python3 to be found. Python versions to be found at the same time.
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 both Note: See 'pyenv help global' for tips on allowing multiple
python2 and python3 to be found. Python versions to be found at the same time.
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 both Note: See 'pyenv help global' for tips on allowing multiple
python2 and python3 to be found. Python versions to be found at the same time.
OUT OUT
} }