1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-08 11:33:49 -05:00

Compare commits

...

19 Commits

Author SHA1 Message Date
Anton Petrov
6656066d4f 1.2.27 2021-05-01 08:41:27 +03:00
Anton Petrov
9edeafbc77 1.2.27 2021-05-01 08:41:08 +03:00
Anton Petrov
54e58dc778 Merge pull request #1882 from msimacek/master
Add GraalPython 21.1.0
2021-04-25 15:26:25 +03:00
Michael Simacek
a9a3c96bbd Add GraalPython 21.1.0 2021-04-21 11:15:54 +02:00
Anton Petrov
b1d1ceba82 Merge pull request #1880 from Theelgirl/master
Add CPython 3.10.0a7
2021-04-20 11:17:30 +03:00
Theelgirl
8dd8fa2d66 Fix missing character in checksum and add tgz checksum 2021-04-19 09:27:38 -07:00
Theelgirl
30ba8356bc Add CPython 3.10.0a7 2021-04-19 09:15:12 -07:00
Theelgirl
e18620c0a7 Add CPython 3.10.0a7 2021-04-19 09:14:23 -07:00
Anton Petrov
6759b7cdf1 Merge pull request #1874 from scop/docs/version-file-separator
docs(README): fix info about version-file separator
2021-04-17 10:59:08 +03:00
Ville Skyttä
60dbcea612 docs(README): fix info about version-file separator
Any whitespace doesn't work, need version per line.
2021-04-16 18:48:32 +03:00
Anton Petrov
2924886a77 Merge pull request #1350 from maxbrunet/feature/versions/dotglob
List versions starting with a dot
2021-04-15 21:02:50 +03:00
Anton Petrov
58e3a0ce18 Merge pull request #1866 from scop/feat/python-version-comments
feat: support (skip) commented lines in version-file
2021-04-15 21:00:03 +03:00
Anton Petrov
4cc08407ed Merge pull request #1873 from dand-oss/pypy3.7.4
pypy3.7-7.3.4
2021-04-15 20:58:56 +03:00
Dan Dees
526750e889 pypy3.7-7.3.4 2021-04-13 13:56:24 +07:00
Ville Skyttä
641916270b feat: support (skip) commented lines in version-file
Sometimes it is convenient to be able to temporarily disable something
in a version-file. Because these files often aren't necessarily tracked
in a SCM, especially when working with virtualenvs, the SCM diffs won't
help with showing removed lines which are currently the only way to
disable something.
2021-04-11 07:46:34 +03:00
Anton Petrov
c010935abd Update COMMANDS.md 2021-04-09 10:46:22 +03:00
Anton Petrov
fab0082bd5 Merge pull request #1868 from anton-petrov/master
Create miniforge3-4.10
2021-04-08 13:03:55 +03:00
Anton Petrov
0e1b1229ce Create miniforge3-4.10 2021-04-08 12:17:21 +03:00
Maxime Brunet
2b174ab69f List versions starting with a dot 2019-06-02 16:16:52 -04:00
14 changed files with 162 additions and 17 deletions

View File

@@ -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)

View File

@@ -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`

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View 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

View 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

View 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

View 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

View File

@@ -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}" ]
}

View File

@@ -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"
}

View File

@@ -154,3 +154,10 @@ OUT
1.9
OUT
}
@test "lists dot directories under versions" {
create_version ".venv"
run pyenv-versions --bare
assert_success ".venv"
}