mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 19:43:48 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca90363d73 | ||
|
|
672eef1561 | ||
|
|
384361167a | ||
|
|
1bcaab05b7 |
2
.github/workflows/macos_build.yml
vendored
2
.github/workflows/macos_build.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
runs-on: macos-11
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# Normally, we would use the superbly maintained...
|
# Normally, we would use the superbly maintained...
|
||||||
|
|||||||
2
.github/workflows/modified_scripts_build.yml
vendored
2
.github/workflows/modified_scripts_build.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}}
|
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}}
|
||||||
os: ["macos-11", "macos-12"]
|
os: ["macos-13", "macos-14"]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
4
.github/workflows/pyenv_tests.yml
vendored
4
.github/workflows/pyenv_tests.yml
vendored
@@ -12,8 +12,8 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- macos-12
|
- macos-14
|
||||||
- macos-11
|
- macos-13
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# Version History
|
# Version History
|
||||||
|
|
||||||
|
## Release v2.4.6
|
||||||
|
* CI: push MacOS jobs to MacOS 13 and 14 by @native-api in https://github.com/pyenv/pyenv/pull/3002
|
||||||
|
* Add 3.13.0b3t and exclude it from `pyenv latest` by @colesbury in https://github.com/pyenv/pyenv/pull/3001
|
||||||
|
* Speed up `pyenv prefix` by not constructing advice text when it would be discarded by @Erotemic in https://github.com/pyenv/pyenv/pull/3005
|
||||||
|
|
||||||
## Release v2.4.5
|
## Release v2.4.5
|
||||||
* Add CPython 3.13.0b3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/2996
|
* Add CPython 3.13.0b3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/2996
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
version="2.4.5"
|
version="2.4.6"
|
||||||
git_revision=""
|
git_revision=""
|
||||||
|
|
||||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ IFS=$'\n'
|
|||||||
|
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
||||||
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d'));
|
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d' -e '/[0-9]+t$/d'));
|
||||||
|
|
||||||
# Compose a sorting key, followed by | and original value
|
# Compose a sorting key, followed by | and original value
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ OLDIFS="$IFS"
|
|||||||
{ IFS=:
|
{ IFS=:
|
||||||
for version in ${PYENV_VERSION}; do
|
for version in ${PYENV_VERSION}; do
|
||||||
if [ "$version" = "system" ]; then
|
if [ "$version" = "system" ]; then
|
||||||
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python 2>/dev/null)" || \
|
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python --skip-advice 2>/dev/null)" || \
|
||||||
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python3 2>/dev/null)" || \
|
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python3 --skip-advice 2>/dev/null)" || \
|
||||||
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python2 2>/dev/null)"; then
|
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python2 --skip-advice 2>/dev/null)"; then
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
# In some distros (Arch), Python can be found in sbin as well as bin
|
# In some distros (Arch), Python can be found in sbin as well as bin
|
||||||
PYENV_PREFIX_PATH="${PYTHON_PATH%/?(s)bin/*}"
|
PYENV_PREFIX_PATH="${PYTHON_PATH%/?(s)bin/*}"
|
||||||
|
|||||||
@@ -128,9 +128,9 @@ print_version() {
|
|||||||
|
|
||||||
# Include "system" in the non-bare output, if it exists
|
# Include "system" in the non-bare output, if it exists
|
||||||
if [ -n "$include_system" ] && \
|
if [ -n "$include_system" ] && \
|
||||||
(PYENV_VERSION=system pyenv-which python >/dev/null 2>&1 || \
|
(PYENV_VERSION=system pyenv-which python --skip-advice >/dev/null 2>&1 || \
|
||||||
PYENV_VERSION=system pyenv-which python3 >/dev/null 2>&1 || \
|
PYENV_VERSION=system pyenv-which python3 --skip-advice >/dev/null 2>&1 || \
|
||||||
PYENV_VERSION=system pyenv-which python2 >/dev/null 2>&1) ; then
|
PYENV_VERSION=system pyenv-which python2 --skip-advice >/dev/null 2>&1) ; then
|
||||||
print_version system "/"
|
print_version system "/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
#
|
#
|
||||||
# Summary: Display the full path to an executable
|
# Summary: Display the full path to an executable
|
||||||
#
|
#
|
||||||
# Usage: pyenv which <command> [--nosystem]
|
# Usage: pyenv which <command> [--nosystem] [--skip-advice]
|
||||||
#
|
#
|
||||||
# Displays the full path to the executable that pyenv will invoke when
|
# Displays the full path to the executable that pyenv will invoke when
|
||||||
# you run the given command.
|
# you run the given command.
|
||||||
# Use --nosystem argument in case when you don't need to search command in the
|
# Use --nosystem argument in case when you don't need to search command in the
|
||||||
# system environment.
|
# system environment.
|
||||||
#
|
# Internal switch --skip-advice used to skip printing an error message on a
|
||||||
|
# failed search.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
@@ -18,11 +19,27 @@ if [ "$1" = "--complete" ]; then
|
|||||||
exec pyenv-shims --short
|
exec pyenv-shims --short
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$2" = "--nosystem" ]; then
|
system="system"
|
||||||
system=""
|
SKIP_ADVICE=""
|
||||||
else
|
PYENV_COMMAND="$1"
|
||||||
system="system"
|
|
||||||
fi
|
while [[ $# -gt 0 ]]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
--skip-advice)
|
||||||
|
SKIP_ADVICE=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--nosystem)
|
||||||
|
system=""
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
remove_from_path() {
|
remove_from_path() {
|
||||||
local path_to_remove="$1"
|
local path_to_remove="$1"
|
||||||
@@ -36,8 +53,6 @@ remove_from_path() {
|
|||||||
echo "${result#:}"
|
echo "${result#:}"
|
||||||
}
|
}
|
||||||
|
|
||||||
PYENV_COMMAND="$1"
|
|
||||||
|
|
||||||
if [ -z "$PYENV_COMMAND" ]; then
|
if [ -z "$PYENV_COMMAND" ]; then
|
||||||
pyenv-help --usage which >&2
|
pyenv-help --usage which >&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -85,16 +100,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "pyenv: $PYENV_COMMAND: command not found" >&2
|
echo "pyenv: $PYENV_COMMAND: command not found" >&2
|
||||||
|
if [ -z "$SKIP_ADVICE" ]; then
|
||||||
versions="$(pyenv-whence "$PYENV_COMMAND" || true)"
|
versions="$(pyenv-whence "$PYENV_COMMAND" || true)"
|
||||||
if [ -n "$versions" ]; then
|
if [ -n "$versions" ]; then
|
||||||
{ echo
|
{ echo
|
||||||
echo "The \`$1' 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 both"
|
||||||
echo " python2 and python3 to be found."
|
echo " python2 and python3 to be found."
|
||||||
} >&2
|
} >&2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 127
|
exit 127
|
||||||
|
|||||||
2
plugins/python-build/share/python-build/3.13.0b3t
Normal file
2
plugins/python-build/share/python-build/3.13.0b3t
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export PYTHON_BUILD_FREE_THREADING=1
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")"/3.13.0b3
|
||||||
@@ -10,7 +10,7 @@ pyenv_install_resolve_latest() {
|
|||||||
$(python-build --definitions | \
|
$(python-build --definitions | \
|
||||||
grep -F "${DEFINITION_PREFIX}" | \
|
grep -F "${DEFINITION_PREFIX}" | \
|
||||||
grep "^${DEFINITION_TYPE}" | \
|
grep "^${DEFINITION_TYPE}" | \
|
||||||
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/(b|rc)[0-9]+$/d' | \
|
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/(b|rc)[0-9]+$/d' -e '/[0-9]+t$/d' | \
|
||||||
sort -t. -k1,1r -k 2,2nr -k 3,3nr \
|
sort -t. -k1,1r -k 2,2nr -k 3,3nr \
|
||||||
|| true))
|
|| true))
|
||||||
DEFINITION="${DEFINITION_CANDIDATES}"
|
DEFINITION="${DEFINITION_CANDIDATES}"
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ echo 3.8.5-latest
|
|||||||
echo 3.8.5a2
|
echo 3.8.5a2
|
||||||
echo 3.8.5b3
|
echo 3.8.5b3
|
||||||
echo 3.8.5rc2
|
echo 3.8.5rc2
|
||||||
|
echo 3.8.5t
|
||||||
|
echo 3.8.5b3t
|
||||||
|
echo 3.8.5rc2t
|
||||||
echo 3.8.1
|
echo 3.8.1
|
||||||
echo 3.8.1/envs/foo
|
echo 3.8.1/envs/foo
|
||||||
!
|
!
|
||||||
|
|||||||
@@ -155,3 +155,15 @@ exit
|
|||||||
PYENV_VERSION=3.4 run pyenv-which python
|
PYENV_VERSION=3.4 run pyenv-which python
|
||||||
assert_success "version=3.4.2"
|
assert_success "version=3.4.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "skip advice supresses error messages" {
|
||||||
|
create_executable "2.7" "python"
|
||||||
|
create_executable "3.3" "py.test"
|
||||||
|
create_executable "3.4" "py.test"
|
||||||
|
|
||||||
|
PYENV_VERSION=2.7 run pyenv-which py.test --skip-advice
|
||||||
|
assert_failure
|
||||||
|
assert_output <<OUT
|
||||||
|
pyenv: py.test: command not found
|
||||||
|
OUT
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user