mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-09 03:53:48 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
050f88c78b | ||
|
|
3ced1c4751 | ||
|
|
03b60aafec | ||
|
|
6a7ecfe409 | ||
|
|
d201daeb33 | ||
|
|
468dc81107 |
3
.github/workflows/modified_scripts_build.yml
vendored
3
.github/workflows/modified_scripts_build.yml
vendored
@@ -21,8 +21,7 @@ jobs:
|
|||||||
echo "$EOF" >> $GITHUB_ENV;
|
echo "$EOF" >> $GITHUB_ENV;
|
||||||
- id: modified-versions
|
- id: modified-versions
|
||||||
run: |
|
run: |
|
||||||
echo -n "::set-output name=versions::"
|
echo "versions=`echo "${{ env.versions }}" | jq -R . | jq -sc .`" >> $GITHUB_OUTPUT
|
||||||
echo "${{ env.versions }}" | jq -R . | jq -sc .
|
|
||||||
macos_build:
|
macos_build:
|
||||||
needs: discover_modified_scripts
|
needs: discover_modified_scripts
|
||||||
if: needs.discover_modified_scripts.outputs.versions != '[""]'
|
if: needs.discover_modified_scripts.outputs.versions != '[""]'
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# Version History
|
# Version History
|
||||||
|
|
||||||
|
## Release v2.4.15
|
||||||
|
* CI: replace set-output with GITHUB_OUTPUT by @tuzi3040 in https://github.com/pyenv/pyenv/pull/3079
|
||||||
|
* Make uninstall yes/no prompt consistent with others by @dpoznik in https://github.com/pyenv/pyenv/pull/3080
|
||||||
|
* Add CPython 3.13.0 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3081
|
||||||
|
* Avoid shadowing of virtualenvs with the name starting with "python-" by @aarbouin in https://github.com/pyenv/pyenv/pull/3086
|
||||||
|
* Support free-threaded CPython flavor in prefix resolution by @native-api in https://github.com/pyenv/pyenv/pull/3090
|
||||||
|
|
||||||
## Release v2.4.14
|
## Release v2.4.14
|
||||||
* Add CPython 3.12.7 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3078
|
* Add CPython 3.12.7 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3078
|
||||||
* Add CPython 3.13.0rc3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3077
|
* Add CPython 3.13.0rc3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3077
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
version="2.4.14"
|
version="2.4.15"
|
||||||
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
|
||||||
|
|||||||
@@ -48,16 +48,25 @@ IFS=$'\n'
|
|||||||
exit $exitcode;
|
exit $exitcode;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
suffix=""
|
||||||
|
if [[ $prefix =~ ^(.*[0-9])t$ ]]; then
|
||||||
|
suffix="t"
|
||||||
|
prefix="${BASH_REMATCH[1]}"
|
||||||
|
fi
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/11856054/is-there-an-easy-way-to-pass-a-raw-string-to-grep/63483807#63483807
|
# https://stackoverflow.com/questions/11856054/is-there-an-easy-way-to-pass-a-raw-string-to-grep/63483807#63483807
|
||||||
prefix_re="$(sed 's/[^\^]/[&]/g;s/[\^]/\\&/g' <<< "$prefix")"
|
prefix_re="$(sed 's/[^\^]/[&]/g;s/[\^]/\\&/g' <<< "$prefix")"
|
||||||
|
suffix_re="$(sed 's/[^\^]/[&]/g;s/[\^]/\\&/g' <<< "$suffix")"
|
||||||
# FIXME: more reliable and readable would probably be to loop over them and transform in pure Bash
|
# FIXME: more reliable and readable would probably be to loop over them and transform in pure Bash
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
||||||
grep -Ee "^$prefix_re[-.]" || true))
|
grep -Ee "^$prefix_re[-.].*$suffix_re\$" || true))
|
||||||
|
|
||||||
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' -e '/[0-9]+t$/d'));
|
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d' \
|
||||||
|
$(if [[ -z $suffix ]]; then echo "-e /[0-9]t\$/d"; fi)
|
||||||
|
));
|
||||||
|
|
||||||
# Compose a sorting key, followed by | and original value
|
# Compose a sorting key, followed by | and original value
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
|
|||||||
@@ -32,8 +32,12 @@ OLDIFS="$IFS"
|
|||||||
for version in ${PYENV_VERSION}; do
|
for version in ${PYENV_VERSION}; do
|
||||||
# Remove the explicit 'python-' prefix from versions like 'python-3.12'.
|
# Remove the explicit 'python-' prefix from versions like 'python-3.12'.
|
||||||
normalised_version="${version#python-}"
|
normalised_version="${version#python-}"
|
||||||
if version_exists "${normalised_version}" || [ "$version" = "system" ]; then
|
if version_exists "${version}" || [ "$version" = "system" ]; then
|
||||||
|
versions=("${versions[@]}" "${version}")
|
||||||
|
elif version_exists "${normalised_version}"; then
|
||||||
versions=("${versions[@]}" "${normalised_version}")
|
versions=("${versions[@]}" "${normalised_version}")
|
||||||
|
elif resolved_version="$(pyenv-latest -b "${version}")"; then
|
||||||
|
versions=("${versions[@]}" "${resolved_version}")
|
||||||
elif resolved_version="$(pyenv-latest -b "${normalised_version}")"; then
|
elif resolved_version="$(pyenv-latest -b "${normalised_version}")"; then
|
||||||
versions=("${versions[@]}" "${resolved_version}")
|
versions=("${versions[@]}" "${resolved_version}")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ uninstall-python() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "pyenv: remove $PREFIX? [y|N] "
|
read -p "pyenv: remove $PREFIX? (y/N) "
|
||||||
case "$REPLY" in
|
case "$REPLY" in
|
||||||
y | Y | yes | YES ) ;;
|
y | Y | yes | YES ) ;;
|
||||||
* ) exit 1 ;;
|
* ) exit 1 ;;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
|||||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||||
if has_tar_xz_support; then
|
if has_tar_xz_support; then
|
||||||
install_package "Python-3.13.0rc3" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc3.tar.xz#c8bc790185af1cb77b75c01cbc1aa642dfdcf97a370d2d10090bc7baa70da57e" standard verify_py313 copy_python_gdb ensurepip
|
install_package "Python-3.13.0" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tar.xz#086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d" standard verify_py313 copy_python_gdb ensurepip
|
||||||
else
|
else
|
||||||
install_package "Python-3.13.0rc3" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc3.tgz#e5e8611d1bfbfda4accf8fab868712252a9c5f6aa5f13f6a5093878a9ef38412" standard verify_py313 copy_python_gdb ensurepip
|
install_package "Python-3.13.0" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz#12445c7b3db3126c41190bfdc1c8239c39c719404e844babbd015a1bc3fafcd4" standard verify_py313 copy_python_gdb ensurepip
|
||||||
fi
|
fi
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export PYTHON_BUILD_FREE_THREADING=1
|
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")"/3.13.0rc3
|
|
||||||
2
plugins/python-build/share/python-build/3.13.0t
Normal file
2
plugins/python-build/share/python-build/3.13.0t
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export PYTHON_BUILD_FREE_THREADING=1
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")"/3.13.0
|
||||||
@@ -94,7 +94,7 @@ echo 3.10.6
|
|||||||
!
|
!
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "ignores rolling releases, branch tips, alternative srcs, prereleases and virtualenvs" {
|
@test "ignores rolling releases, branch tips, alternative srcs, prereleases, virtualenvs; 't' versions if prefix without 't'" {
|
||||||
create_executable pyenv-versions <<!
|
create_executable pyenv-versions <<!
|
||||||
#!$BASH
|
#!$BASH
|
||||||
echo 3.8.5-dev
|
echo 3.8.5-dev
|
||||||
@@ -116,6 +116,21 @@ echo 3.8.1/envs/foo
|
|||||||
!
|
!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "resolves to a 't' version if prefix has 't'" {
|
||||||
|
create_executable pyenv-versions <<!
|
||||||
|
#!$BASH
|
||||||
|
echo 3.13.2t
|
||||||
|
echo 3.13.5
|
||||||
|
echo 3.13.5t
|
||||||
|
echo 3.14.6
|
||||||
|
!
|
||||||
|
run pyenv-latest 3t
|
||||||
|
assert_success
|
||||||
|
assert_output <<!
|
||||||
|
3.13.5t
|
||||||
|
!
|
||||||
|
}
|
||||||
|
|
||||||
@test "falls back to argument with -b" {
|
@test "falls back to argument with -b" {
|
||||||
create_executable pyenv-versions <<!
|
create_executable pyenv-versions <<!
|
||||||
#!$BASH
|
#!$BASH
|
||||||
|
|||||||
@@ -127,3 +127,10 @@ OUT
|
|||||||
assert_success
|
assert_success
|
||||||
assert_output "3.12.6"
|
assert_output "3.12.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "pyenv version started by python-" {
|
||||||
|
create_version "python-3.12.6"
|
||||||
|
PYENV_VERSION="python-3.12.6" run pyenv-version-name
|
||||||
|
assert_success
|
||||||
|
assert_output "python-3.12.6"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user