Compare commits

...

4 Commits

Author SHA1 Message Date
Kevin Squire
62ca8650ec
Merge b4b8f71dde into 2afd1733a4 2025-11-10 10:51:08 +10:00
binbjz
2afd1733a4
Add Miniconda3-25.9.1-1 (#3357)
Some checks failed
macos_build / macos_build (3.10) (push) Has been cancelled
macos_build / macos_build (3.11) (push) Has been cancelled
macos_build / macos_build (3.12) (push) Has been cancelled
macos_build / macos_build (3.13) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-15-intel) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.10) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.11) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.12) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.13) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.9) (push) Has been cancelled
2025-11-08 14:35:44 +03:00
Edgar Ramírez Mondragón
032022dace
Replace macos-13 with macos-15-intel (#3356)
Some checks failed
macos_build / macos_build (3.10) (push) Has been cancelled
macos_build / macos_build (3.11) (push) Has been cancelled
macos_build / macos_build (3.12) (push) Has been cancelled
macos_build / macos_build (3.13) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-15-intel) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.10) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.11) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.12) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.13) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.9) (push) Has been cancelled
> The macOS 13 Ventura based runner images will begin deprecation on September 22nd and will be fully unsupported by December 4th for GitHub and ADO.

https://github.com/actions/runner-images/issues/13046

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
2025-11-05 22:10:29 +03:00
Kevin Squire
b4b8f71dde Add version aliases
An older plugin, pyenv-alias, allowed naming the desired python version with
an alias, which allowed installing multiple versions of the same python
version.  This is particularly useful on Apple silicon if you want to install
both arm and x86_64 versions of python.

Unfortunately, the pyenv-alias plugin broke when the code was updated to
allow specifying multiple versions of Python to install at once, and the
current code is not amenable to modifying the version in place with another
plugin.
2024-05-21 11:32:47 -07:00
8 changed files with 137 additions and 6 deletions

View File

@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}}
os: ["macos-13", "macos-14", "macos-15"]
os: ["macos-14", "macos-15", "macos-15-intel"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
@ -98,7 +98,7 @@ jobs:
fail-fast: false
matrix:
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions_cpython_only)}}
os: ["macos-13", "macos-14", "macos-15"]
os: ["macos-14", "macos-15", "macos-15-intel"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5

View File

@ -12,8 +12,8 @@ jobs:
os:
- ubuntu-24.04
- ubuntu-22.04
- macos-15-intel
- macos-14
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5

View File

@ -123,6 +123,36 @@ DEFINITIONS=("${ARGUMENTS[@]}")
[[ "${#DEFINITIONS[*]}" -eq 0 ]] && DEFINITIONS=($(pyenv-local 2>/dev/null || true))
[[ "${#DEFINITIONS[*]}" -eq 0 ]] && usage 1 >&2
is_array() {
# no argument passed
[[ $# -ne 1 ]] && echo 'Supply a variable name as an argument'>&2 && return 2
local var=$1
# use a variable to avoid having to escape spaces
local regex="^declare -[aA] ${var}(=|$)"
[[ $(declare -p "$var" 2> /dev/null) =~ $regex ]] && return 0
}
# If VERSION_ALIAS exists, create a 1-element array, VERSION_ALIASES, from VERSION_ALIAS
if [ -n "${VERSION_ALIAS}" ]; then
# Make sure VERSION_ALIASES doesn't already exist
# If it does, print an error about defining only one of VERSION_ALIAS or VERSION_ALIASES
if is_array VERSION_ALIASES; then
echo "Define only one of VERSION_ALIAS or VERSION_ALIASES" >&2
exit 1
fi
VERSION_ALIASES=("${VERSION_ALIAS}")
fi
# If VERSION_ALIASES exists, make sure it has the same number of elements as DEFINITIONS
if is_array VERSION_ALIASES; then
if [[ "${#VERSION_ALIASES[@]}" -ne "${#DEFINITIONS[@]}" ]]; then
echo "VERSION_ALIASES must have the same number of elements as DEFINITIONS" >&2
exit 1
fi
fi
# Define `before_install` and `after_install` functions that allow
# plugin hooks to register a string of code for execution before or
# after the installation process.
@ -152,7 +182,12 @@ IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done
COMBINED_STATUS=0
for DEFINITION in "${DEFINITIONS[@]}"; do
for i in "${!DEFINITIONS[@]}"; do
DEFINITION="${DEFINITIONS[$i]}"
if is_array VERSION_ALIASES; then
VERSION_ALIAS="${VERSION_ALIASES[$i]}"
fi
STATUS=0
# Try to resolve a prefix if user indeed gave a prefix.
@ -160,8 +195,9 @@ for DEFINITION in "${DEFINITIONS[@]}"; do
# and hooks also see the resolved name
DEFINITION="$(pyenv-latest -f -k "$DEFINITION")"
# Set VERSION_NAME from $DEFINITION. Then compute the installation prefix.
VERSION_NAME="${DEFINITION##*/}"
# Set VERSION_NAME from $VERSION_ALIAS if it is defined, else $DEFINITION.
# Then compute the installation prefix.
VERSION_NAME="${VERSION_ALIAS:-$DEFINITION##*/}"
[ -n "$DEBUG" ] && VERSION_NAME="${VERSION_NAME}-debug"
PREFIX="${PYENV_ROOT}/versions/${VERSION_NAME}"

View File

@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py310_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-aarch64.sh#28fc3db9c7ee63cedab38b0e6006409f1f448be7ffc57b270623efd4422b0608" "miniconda" verify_py310
;;
"Linux-x86_64" )
install_script "Miniconda3-py310_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-x86_64.sh#04a8b03d8b0ec062d923e592201a6fd88b7247c309ef8848afb25c424c40ac39" "miniconda" verify_py310
;;
"MacOSX-arm64" )
install_script "Miniconda3-py310_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-MacOSX-arm64.sh#fb3fbef60259b36b0248c73fecdd974f8554d5fccfe0a7b8a45eb06dedbe8a85" "miniconda" verify_py310
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py311_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-aarch64.sh#4e0723b9d76aa491cf22511dac36f4fdec373e41d2a243ff875e19b8df39bf94" "miniconda" verify_py311
;;
"Linux-x86_64" )
install_script "Miniconda3-py311_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-x86_64.sh#238abad23f8d4d8ba89dd05df0b0079e278909a36e06955f12bbef4aa94e6131" "miniconda" verify_py311
;;
"MacOSX-arm64" )
install_script "Miniconda3-py311_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-MacOSX-arm64.sh#5d5f58477f40d23e491394a7114a318724f1f9161e2b8bd08c5845c47b036b72" "miniconda" verify_py311
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py312_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-aarch64.sh#11ab86931679e6d9b15112f2e866dad1fcbd89a039a6442c0bce7b86fd282f0a" "miniconda" verify_py312
;;
"Linux-x86_64" )
install_script "Miniconda3-py312_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-x86_64.sh#a0def9c732d94b156529ef7db8edd6e1862cee784a27a4961870dca86e89fba4" "miniconda" verify_py312
;;
"MacOSX-arm64" )
install_script "Miniconda3-py312_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-MacOSX-arm64.sh#6bf3d8cac26587f6e53f05cd781f9201d2918c37dc3ef20677b383e250568100" "miniconda" verify_py312
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py313_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-aarch64.sh#a0de4562c368a8b5ca4385843f405684c79bea7aa3b75d7513ff99c0c6435d51" "miniconda" verify_py313
;;
"Linux-x86_64" )
install_script "Miniconda3-py313_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-x86_64.sh#6022714da22986097bbefa13dab3d957257fef04e1c37d1ebd3645b5b99bc9d4" "miniconda" verify_py313
;;
"MacOSX-arm64" )
install_script "Miniconda3-py313_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-MacOSX-arm64.sh#491f35ab841c99225e5680209d5455a2f5278551378781c0dfeaf2586d7ae3df" "miniconda" verify_py313
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py39_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-aarch64.sh#983ef280dec1d0f965b6b6133c585ce902e07136105d4977aa5de3aa027cfa55" "miniconda" verify_py39
;;
"Linux-x86_64" )
install_script "Miniconda3-py39_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-x86_64.sh#d8d13344b46a057659397b9ca1a948d184bf59f04efa8864df8c01f7557e2baa" "miniconda" verify_py39
;;
"MacOSX-arm64" )
install_script "Miniconda3-py39_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-MacOSX-arm64.sh#857f09c2be8feaf3664064a2e324e96656104a9a45ab0a657a49c03754855b77" "miniconda" verify_py39
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac