mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6656066d4f | ||
|
|
9edeafbc77 | ||
|
|
54e58dc778 | ||
|
|
a9a3c96bbd | ||
|
|
b1d1ceba82 | ||
|
|
8dd8fa2d66 | ||
|
|
30ba8356bc | ||
|
|
e18620c0a7 | ||
|
|
6759b7cdf1 | ||
|
|
60dbcea612 | ||
|
|
2924886a77 | ||
|
|
58e3a0ce18 | ||
|
|
4cc08407ed | ||
|
|
526750e889 | ||
|
|
641916270b | ||
|
|
c010935abd | ||
|
|
fab0082bd5 | ||
|
|
0e1b1229ce | ||
|
|
2b174ab69f |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
## Version History
|
||||
|
||||
## 1.2.27
|
||||
|
||||
* Add GraalPython 21.1.0 (#1882)
|
||||
* Add CPython 3.10.0a7 (#1880)
|
||||
* Docs(README): fix info about version-file separator (#1874)
|
||||
* List versions starting with a dot (#1350)
|
||||
* Feat: support (skip) commented lines in version-file (#1866)
|
||||
* pypy3.7-7.3.4 (#1873)
|
||||
* Create miniforge3-4.10 (#1868)
|
||||
* Add CPython 3.9.4 (#1865)
|
||||
|
||||
## 1.2.26
|
||||
|
||||
* Add CPython 3.9.4 (#1865)
|
||||
|
||||
@@ -267,6 +267,8 @@ you run the given command.
|
||||
$ pyenv which python3.3
|
||||
/home/yyuu/.pyenv/versions/3.3.3/bin/python3.3
|
||||
|
||||
Use --nosystem argument in case when you don't need to search command in the
|
||||
system environment.
|
||||
|
||||
## `pyenv whence`
|
||||
|
||||
|
||||
@@ -135,7 +135,8 @@ global system 3.3.6 3.2 2.5`. At this point, one should be able to find the full
|
||||
executable path to each of these using `pyenv which`, e.g. `pyenv which python2.5`
|
||||
(should display `$(pyenv root)/versions/2.5/bin/python2.5`), or `pyenv which
|
||||
python3.4` (should display path to system Python3). You can also specify multiple
|
||||
versions in a `.python-version` file, separated by newlines or any whitespace.
|
||||
versions in a `.python-version` file, separated by newlines.
|
||||
Lines starting with a `#` are ignored.
|
||||
|
||||
### Locating the Python Installation
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="1.2.26"
|
||||
version="1.2.27"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -9,7 +9,7 @@ if [ -e "$VERSION_FILE" ]; then
|
||||
# Read the first non-whitespace word from the specified version file.
|
||||
# Be careful not to load it whole in case there's something crazy in it.
|
||||
IFS="${IFS}"$'\r'
|
||||
words=($(cut -b 1-1024 "$VERSION_FILE" | sed 's/[[:space:]]*\([^[:space:]^[:space:]]*\).*/\1/'))
|
||||
words=($(cut -b 1-1024 "$VERSION_FILE" | sed -n 's/^[[:space:]]*\([^[:space:]#][^[:space:]]*\).*/\1/p'))
|
||||
versions=("${words[@]}")
|
||||
|
||||
if [ -n "$versions" ]; then
|
||||
|
||||
@@ -122,7 +122,7 @@ if [ -n "$include_system" ] && \
|
||||
print_version system
|
||||
fi
|
||||
|
||||
shopt -s nullglob
|
||||
shopt -s dotglob nullglob
|
||||
for path in "$versions_dir"/*; do
|
||||
if [ -d "$path" ]; then
|
||||
if [ -n "$skip_aliases" ] && [ -L "$path" ]; then
|
||||
@@ -139,7 +139,7 @@ for path in "$versions_dir"/*; do
|
||||
done
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
shopt -u dotglob nullglob
|
||||
|
||||
if [ "$num_versions" -eq 0 ] && [ -n "$include_system" ]; then
|
||||
echo "Warning: no Python detected on the system" >&2
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1h" "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1h.tar.gz#5c9ca8774bd7b03e5784f26ae9e9e6d749c9da2438545077e6b3d755a06595d9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.10.0a6" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a6.tar.xz#70ddd5898b996394103d114185429212dadeaf60fa260054712731bc126dca5c" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.10.0a6" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a6.tgz#81ba70f5ab95358f20886da85288af4117b45eadbe62590ce9a5bbb015f0faf1" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.10.0a7
Normal file
10
plugins/python-build/share/python-build/3.10.0a7
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.10.0a7" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a7.tar.xz#513199724498513e7098c46bf6442192f5ffef32478d92499704aeeff3516db2" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.10.0a7" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a7.tgz#8a13ee8033d32085e743e965f72e5ba631c82c8ad4d75d5ff68731a74c5c742b" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
48
plugins/python-build/share/python-build/graalpython-21.1.0
Normal file
48
plugins/python-build/share/python-build/graalpython-21.1.0
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='21.1.0'
|
||||
BUILD=''
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux64" )
|
||||
graalpython_arch="linux"
|
||||
checksum="fb48d041e4113cf8a0d0535402eaa64af112b1999839ebee49f431963af3ece1"
|
||||
;;
|
||||
"osx64" )
|
||||
graalpython_arch="macos"
|
||||
checksum="3efb2257b21ce7fdab5d3986f571ad531a5c1c73d23468431a5c8440ee49c2f6"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPython is available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
25
plugins/python-build/share/python-build/miniforge3-4.10
Normal file
25
plugins/python-build/share/python-build/miniforge3-4.10
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-4.10.0-0-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/download/4.10.0-0/Miniforge3-4.10.0-0-Linux-ppc64le.sh#cb72e16906f025bbc979b5e72b494722" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-4.10.0-0-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.0-0/Miniforge3-4.10.0-0-Linux-x86_64.sh#3db11e33e22a78e2d3371acc883625df" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-4.10.0-0-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/download/4.10.0-0/Miniforge3-4.10.0-0-Linux-aarch64.sh#64ec2e626c1c71332a73081fe482d08e" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-4.10.0-0-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/download/4.10.0-0/Miniforge3-4.10.0-0-MacOSX-arm64.sh#a44e4306922989e49a888c4dd2ad6263" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-4.10.0-0-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.0-0/Miniforge3-4.10.0-0-MacOSX-x86_64.sh#76a212a23d14e3f027d44fe6837e4a7d" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
39
plugins/python-build/share/python-build/pypy3.7-7.3.4
Normal file
39
plugins/python-build/share/python-build/pypy3.7-7.3.4
Normal file
@@ -0,0 +1,39 @@
|
||||
VERSION='7.3.4'
|
||||
PYVER='3.7'
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux32" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux32.tar.bz2#04de1a2e80530f3d74abcf133ec046a0fb12d81956bc043dee8ab4799f3b77eb" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux64.tar.bz2#09d7298b44a38648a87995ec06e1e093761644e50f547c8bb0b2d7f4fe433548" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-aarch64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-aarch64.tar.bz2#a4148fa73b74a091e004e1f378b278c0b8830984cbcb91e10fa31fd915c43efe" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"osx64" )
|
||||
if require_osx_version "10.13"; then
|
||||
install_package "pypy${PYVER}-v${VERSION}-osx64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-osx64.tar.bz2#8a4f0e6c7e3845820202bf7f46b48e36886ceb820ff0767963fd74091c4f5d13" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"win64" )
|
||||
install_zip "pypy${PYVER}-v${VERSION}-win64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-win64.zip#0ff4e4653f1ff0653f105680eb101c64c857fa8f828a54a61b02f65c94b5d262" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -5,9 +5,9 @@
|
||||
# This hooks is intended to skip creating shims for those executables.
|
||||
|
||||
conda_exists() {
|
||||
shopt -s nullglob
|
||||
shopt -s dotglob nullglob
|
||||
local condas=($(echo "${PYENV_ROOT}/versions/"*"/bin/conda" "${PYENV_ROOT}/versions/"*"/envs/"*"/bin/conda"))
|
||||
shopt -u nullglob
|
||||
shopt -u dotglob nullglob
|
||||
[ -n "${condas}" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -70,3 +70,15 @@ IN
|
||||
run pyenv-version-file-read my-version
|
||||
assert_success "3.3.5"
|
||||
}
|
||||
|
||||
@test "skips comment lines" {
|
||||
cat > my-version <<IN
|
||||
3.9.3
|
||||
3.8.9
|
||||
# 3.4.0
|
||||
#3.3.7
|
||||
2.7.16
|
||||
IN
|
||||
run pyenv-version-file-read my-version
|
||||
assert_success "3.9.3:3.8.9:2.7.16"
|
||||
}
|
||||
|
||||
@@ -154,3 +154,10 @@ OUT
|
||||
1.9
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "lists dot directories under versions" {
|
||||
create_version ".venv"
|
||||
|
||||
run pyenv-versions --bare
|
||||
assert_success ".venv"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user