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

Compare commits

...

21 Commits

Author SHA1 Message Date
Ivan Pozdeev
f17809c4b9 2.4.8 2024-07-21 07:02:45 +03:00
native-api
ae5ee4de26 Merge pull request #3021 from native-api/pyenv_latest_b_f
pyenv-latest: replace -q with -b and -f, document as internal
2024-07-21 06:58:00 +03:00
native-api
e9611beffe Fix tests failing if plugins are installed (#3022)
Drop the failing test in favor of a better-written test
that also tests the same
2024-07-21 06:57:39 +03:00
Ivan Pozdeev
e44b12c2dc Remove nop tests
Easy syncing with Rbenv is not as important now
2024-07-21 06:36:06 +03:00
Ivan Pozdeev
9373970678 pyenv-latest: replace -q with -b and -f, document as internal
More tailored for the emergent internal use cases
2024-07-21 06:31:42 +03:00
ThomasHaz
88f76ee787 README: Remove reference to Fig [https://fig.io] (#3018)
[Fig](https://fig.io) has been sunlit for new users, with access being removed in September
2024-07-20 21:32:57 +03:00
Edgar Ramírez Mondragón
e396561661 Add CPython 3.13.0b4 and 3.13.0b4t (#3019) 2024-07-20 21:29:18 +03:00
native-api
cdd97d8c30 Fix pyenv-uninstall not having the debug tracing invocation (#3020) 2024-07-20 21:22:50 +03:00
Ivan Pozdeev
adf3c2bccf 2.4.7 2024-07-06 04:44:35 +03:00
native-api
50e726ac41 Fix debug build for X.Yy-dev (#3011)
also just use extglob everywhere
2024-07-06 04:04:46 +03:00
native-api
662b5ddd13 Merge pull request #3009 from binbjz/add-new-anaconda3
Add support for anaconda3-2024.06-1
2024-07-06 03:43:27 +03:00
binbjz
d81eebf8d1 Add support for anaconda3-2024.06-1 2024-07-05 19:37:22 +08:00
binbjz
b11728c284 Merge branch 'pyenv:master' into master 2024-07-05 19:28:02 +08:00
Ivan Pozdeev
ca90363d73 2.4.6 2024-07-05 06:57:48 +03:00
Jon Crall
672eef1561 Speed up pyenv prefix by not constructing advice text when it would be discarded (#3005)
by adding an internal flag
2024-07-04 03:49:12 +03:00
Sam Gross
384361167a Add 3.13.0b3t and exclude it from pyenv latest (#3001)
This adds the free-threaded (without GIL) version of 3.13.0b3.

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2024-07-01 22:50:03 +03:00
native-api
1bcaab05b7 CI: push MacOS jobs to MacOS 13 and 14 (#3002)
Github has finally released those as free and retired macos-11
2024-07-01 22:38:06 +03:00
Ivan Pozdeev
2c2c7616e2 2.4.5 2024-06-30 20:58:02 +03:00
Edgar Ramírez Mondragón
e8e8cfddcd Add CPython 3.13.0b3 (#2996) 2024-06-30 20:55:53 +03:00
binbjz
bc6a0db677 Merge branch 'pyenv:master' into master 2024-06-27 20:39:59 +08:00
zhaobin
4b60ddd06d Add support for miniconda3 24.4.0-0 with py3.12, py3.11, py3.10, py3.9 2024-06-10 15:36:21 +08:00
24 changed files with 163 additions and 118 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
runs-on: macos-11
runs-on: macos-14
steps:
- uses: actions/checkout@v4
# Normally, we would use the superbly maintained...

View File

@@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}}
os: ["macos-11", "macos-12"]
os: ["macos-13", "macos-14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

View File

@@ -12,8 +12,8 @@ jobs:
os:
- ubuntu-22.04
- ubuntu-20.04
- macos-12
- macos-11
- macos-14
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

View File

@@ -1,5 +1,24 @@
# Version History
## Release v2.4.8
* Fix pyenv-uninstall not having the debug tracing invocation by @native-api in https://github.com/pyenv/pyenv/pull/3020
* Add CPython 3.13.0b4 and 3.13.0b4t by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3019
* README: Remove reference to Fig by @ThomasHaz in https://github.com/pyenv/pyenv/pull/3018
* Fix tests failing if plugins are installed by @native-api in https://github.com/pyenv/pyenv/pull/3022
* pyenv-latest: replace -q with -b and -f, document as internal by @native-api in https://github.com/pyenv/pyenv/pull/3021
## Release v2.4.7
* Add support for anaconda3-2024.06-1 by @binbjz in https://github.com/pyenv/pyenv/pull/3009
* Fix debug build for X.Yt-dev by @native-api in https://github.com/pyenv/pyenv/pull/
## 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
* Add CPython 3.13.0b3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/2996
## Release v2.4.4
* Add support for miniconda3 24.5.0-0 with py3.12, py3.11, py3.10, py3.9 by @binbjz in https://github.com/pyenv/pyenv/pull/2994
* Add support for free-threaded Python by @colesbury in https://github.com/pyenv/pyenv/pull/2995

View File

@@ -367,12 +367,6 @@ See [Advanced configuration](#advanced-configuration) for details and more confi
**Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
In MacOS, you might also want to install [Fig](https://fig.io/) which
provides alternative shell completions for many command line tools with an
IDE-like popup interface in the terminal window.
(Note that their completions are independent from Pyenv's codebase
so they might be slightly out of sync for bleeding-edge interface changes.)
### Restart your shell
for the `PATH` changes to take effect.

View File

@@ -12,7 +12,7 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
version="2.4.4"
version="2.4.8"
git_revision=""
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then

View File

@@ -1,9 +1,11 @@
#!/usr/bin/env bash
# Summary: Print the latest installed or known version with the given prefix
# Usage: pyenv latest [-k|--known] [-q|--quiet] <prefix>
# Usage: pyenv latest [-k|--known] <prefix>
#
# -k/--known Select from all known versions instead of installed
# -q/--quiet Do not print an error message on resolution failure
# -b/--bypass (internal) On a resolution failure, do not print an error message
# but rather print the argument unchanged
# -f/--force (internal) Same as -b but also do not return a failure exit code
set -e
[ -n "$PYENV_DEBUG" ] && set -x
@@ -15,8 +17,13 @@ do
FROM_KNOWN=1
shift
;;
-q|--quiet)
QUIET=1
-b|--bypass)
BYPASS=1
shift
;;
-f|--force)
FORCE=1
BYPASS=1
shift
;;
*)
@@ -50,7 +57,7 @@ IFS=$'\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
DEFINITION_CANDIDATES=(\
@@ -71,10 +78,14 @@ IFS=$'\n'
if [[ -n "$DEFINITION" ]]; then
echo "$DEFINITION"
else
if [[ -z $QUIET ]]; then
if [[ -z $BYPASS ]]; then
echo "pyenv: no $([[ -z $FROM_KNOWN ]] && echo installed || echo known) versions match the prefix \`$prefix'" >&2
else
echo "$prefix"
fi
if [[ -z $FORCE ]]; then
exitcode=1
fi
fi
exit $exitcode

View File

@@ -30,9 +30,9 @@ OLDIFS="$IFS"
{ IFS=:
for version in ${PYENV_VERSION}; do
if [ "$version" = "system" ]; then
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python 2>/dev/null)" || \
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python3 2>/dev/null)" || \
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python2 2>/dev/null)"; then
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python --skip-advice 2>/dev/null)" || \
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python3 --skip-advice 2>/dev/null)" || \
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python2 --skip-advice 2>/dev/null)"; then
shopt -s extglob
# In some distros (Arch), Python can be found in sbin as well as bin
PYENV_PREFIX_PATH="${PYTHON_PATH%/?(s)bin/*}"
@@ -42,7 +42,7 @@ OLDIFS="$IFS"
exit 1
fi
else
version="$(pyenv-latest -q "$version" || echo "$version")"
version="$(pyenv-latest -f "$version")"
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
fi
if [ -d "$PYENV_PREFIX_PATH" ]; then

View File

@@ -34,7 +34,7 @@ OLDIFS="$IFS"
versions=("${versions[@]}" "${version}")
elif version_exists "${version#python-}"; then
versions=("${versions[@]}" "${version#python-}")
elif resolved_version="$(pyenv-latest -q "$version")"; then
elif resolved_version="$(pyenv-latest -b "$version")"; then
versions=("${versions[@]}" "${resolved_version}")
else
echo "pyenv: version \`$version' is not installed (set by $(pyenv-version-origin))" >&2

View File

@@ -128,9 +128,9 @@ print_version() {
# Include "system" in the non-bare output, if it exists
if [ -n "$include_system" ] && \
(PYENV_VERSION=system pyenv-which python >/dev/null 2>&1 || \
PYENV_VERSION=system pyenv-which python3 >/dev/null 2>&1 || \
PYENV_VERSION=system pyenv-which python2 >/dev/null 2>&1) ; then
(PYENV_VERSION=system pyenv-which python --skip-advice >/dev/null 2>&1 || \
PYENV_VERSION=system pyenv-which python3 --skip-advice >/dev/null 2>&1 || \
PYENV_VERSION=system pyenv-which python2 --skip-advice >/dev/null 2>&1) ; then
print_version system "/"
fi

View File

@@ -2,13 +2,14 @@
#
# 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
# you run the given command.
# Use --nosystem argument in case when you don't need to search command in the
# system environment.
#
# Internal switch --skip-advice used to skip printing an error message on a
# failed search.
set -e
[ -n "$PYENV_DEBUG" ] && set -x
@@ -18,11 +19,27 @@ if [ "$1" = "--complete" ]; then
exec pyenv-shims --short
fi
if [ "$2" = "--nosystem" ]; then
system="system"
SKIP_ADVICE=""
PYENV_COMMAND="$1"
while [[ $# -gt 0 ]]
do
case "$1" in
--skip-advice)
SKIP_ADVICE=1
shift
;;
--nosystem)
system=""
else
system="system"
fi
shift
;;
*)
shift
;;
esac
done
remove_from_path() {
local path_to_remove="$1"
@@ -36,8 +53,6 @@ remove_from_path() {
echo "${result#:}"
}
PYENV_COMMAND="$1"
if [ -z "$PYENV_COMMAND" ]; then
pyenv-help --usage which >&2
exit 1
@@ -85,17 +100,18 @@ else
fi
echo "pyenv: $PYENV_COMMAND: command not found" >&2
if [ -z "$SKIP_ADVICE" ]; then
versions="$(pyenv-whence "$PYENV_COMMAND" || true)"
if [ -n "$versions" ]; then
{ 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
echo "Note: See 'pyenv help global' for tips on allowing both"
echo " python2 and python3 to be found."
} >&2
fi
fi
exit 127
fi

View File

@@ -158,7 +158,7 @@ for DEFINITION in "${DEFINITIONS[@]}"; do
# Try to resolve a prefix if user indeed gave a prefix.
# We install the version under the resolved name
# and hooks also see the resolved name
DEFINITION="$(pyenv-latest -q -k "$DEFINITION" || echo "$DEFINITION")"
DEFINITION="$(pyenv-latest -f -k "$DEFINITION")"
# Set VERSION_NAME from $DEFINITION. Then compute the installation prefix.
VERSION_NAME="${DEFINITION##*/}"

View File

@@ -11,6 +11,7 @@
# See `pyenv versions` for a complete list of installed versions.
#
set -e
[ -n "$PYENV_DEBUG" ] && set -x
# Provide pyenv completions
if [ "$1" = "--complete" ]; then

View File

@@ -19,6 +19,7 @@ PYTHON_BUILD_VERSION="20180424"
OLDIFS="$IFS"
set -E
shopt -s extglob
[ -n "$PYENV_DEBUG" ] && {
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x
@@ -1784,20 +1785,14 @@ build_package_auto_tcltk() {
fi
}
# extglob must be set at both parse time and runtime
# https://stackoverflow.com/questions/49283740/bash-script-throws-syntax-errors-when-the-extglob-option-is-set-inside-a-subsh
shopt -s extglob
package_is_python() {
shopt -s extglob
case "$1" in
Python-* | jython-* | pypy-* | pypy[0-9].+([0-9])-* | stackless-* )
return 0
;;
esac
return 1
shopt -u extglob
}
shopt -u extglob
apply_patch() {
local package_name="$1"
@@ -2308,7 +2303,6 @@ if [[ "$PYPY_OPTS" == *"--shared"* ]]; then
fi
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
shopt -s extglob
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
if ! is_mac; then
echo "python-build: framework installation is not supported outside of MacOS." >&2
@@ -2334,10 +2328,8 @@ if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; the
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//--enable-framework?(=*([^ ]))?( )/}";
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS% }"
fi
shopt -u extglob
# Build against universal SDK
shopt -s extglob
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
if ! is_mac; then
echo "python-build: universal installation is not supported outside of MacOS." >&2
@@ -2359,7 +2351,6 @@ if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]];
fi
fi
fi
shopt -u extglob
# Compile with `--enable-unicode=ucs4` by default (#257)
if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
@@ -2454,6 +2445,7 @@ python_bin_suffix() {
version_name="${version_name%-dev}"
version_name="${version_name%-rc*}"
version_name="${version_name%rc*}"
version_name="${version_name%%*([^0-9])}"
version_info=(${version_name//./ })
echo "${version_info[0]}.${version_info[1]}"
;;

View File

@@ -3,7 +3,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-3.3.1" "https://www.openssl.org/source/openssl-3.3.1.tar.gz#777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e" 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
if has_tar_xz_support; then
install_package "Python-3.13.0b2" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b2.tar.xz#bf11be01b42a07a3659e4e233591e03da631b7112aa61ee1e030eeb8c5dfd869" standard verify_py313 copy_python_gdb ensurepip
install_package "Python-3.13.0b4" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b4.tar.xz#b2aa557c3c875233abdaf1b124284e5d50f6bb238d62a8b55f12dc92cea1953f" standard verify_py313 copy_python_gdb ensurepip
else
install_package "Python-3.13.0b2" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b2.tgz#c87c42aa8137230a15a02ed90a6600610ba680cb5b54c0fbc57581a0d032e0c4" standard verify_py313 copy_python_gdb ensurepip
install_package "Python-3.13.0b4" "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b4.tgz#6f387984d028686c008a822cf6887e47d8dbc460ebc022358082ecacac5113e6" standard verify_py313 copy_python_gdb ensurepip
fi

View File

@@ -0,0 +1,2 @@
export PYTHON_BUILD_FREE_THREADING=1
source "$(dirname "${BASH_SOURCE[0]}")"/3.13.0b4

View File

@@ -0,0 +1,25 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Anaconda3-2024.06-1-Linux-aarch64" "https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-aarch64.sh#b4be0ad2052236882402902a31d32cd37635d3db194a42f977be0d68a8ff1a31" "anaconda" verify_py312
;;
"Linux-s390x" )
install_script "Anaconda3-2024.06-1-Linux-s390x" "https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-s390x.sh#1b3f4ef4147137fb1861f8251679ea96e651a7c405993c61e39441e43ee2dd11" "anaconda" verify_py312
;;
"Linux-x86_64" )
install_script "Anaconda3-2024.06-1-Linux-x86_64" "https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-x86_64.sh#539bb43d9a52d758d0fdfa1b1b049920ec6f8c6d15ee9fe4a423355fe551a8f7" "anaconda" verify_py312
;;
"MacOSX-arm64" )
install_script "Anaconda3-2024.06-1-MacOSX-arm64" "https://repo.anaconda.com/archive/Anaconda3-2024.06-1-MacOSX-arm64.sh#f9e0795431910ee4ac341c0cc2a0b62e6c497440789b4117c20736db45b34204" "anaconda" verify_py312
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2024.06-1-MacOSX-x86_64" "https://repo.anaconda.com/archive/Anaconda3-2024.06-1-MacOSX-x86_64.sh#9b2aa48bfc58e337176d8b5f3776692815807e1346ec12ebcc46a01801bb4ee0" "anaconda" verify_py312
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Anaconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -888,54 +888,6 @@ OUT
assert_success "hello world"
}
@test "mruby strategy overwrites non-writable files" {
# nop
}
@test "mruby strategy fetches rake if missing" {
# nop
}
@test "rbx uses bundle then rake" {
# nop
}
@test "fixes rbx binstubs" {
# nop
}
@test "JRuby build" {
# nop
}
@test "JRuby+Graal does not install launchers" {
# nop
}
@test "JRuby Java 7 missing" {
# nop
}
@test "JRuby Java is outdated" {
# nop
}
@test "JRuby Java 7 up-to-date" {
# nop
}
@test "Java version string not on first line" {
# nop
}
@test "Java version string on OpenJDK" {
# nop
}
@test "JRuby Java 9 version string" {
# nop
}
@test "non-writable TMPDIR aborts build" {
export TMPDIR="${TMP}/build"
mkdir -p "$TMPDIR"

View File

@@ -15,9 +15,10 @@ after_install 'echo after: \$STATUS'
OUT
stub pyenv-hooks "install : echo '$HOOK_PATH'/install.bash"
stub pyenv-rehash "echo rehashed"
stub pyenv-latest false
definition="${TMP}/3.6.2"
stub pyenv-latest "echo $definition"
cat > "$definition" <<<"echo python-build"
run pyenv-install "$definition"

View File

@@ -18,7 +18,7 @@ stub_python_build_no_latest() {
stub_python_build() {
stub_python_build_no_latest "$@"
stub pyenv-latest false
stub pyenv-latest '-f -k * : shift 2; echo "$@"'
}
@test "install a single version" {
@@ -65,9 +65,9 @@ OUT
stub_python_build_lib
for i in {1..3}; do stub_python_build_no_latest; done
stub pyenv-latest \
'-q -k 3.4 : echo 3.4.2' \
'-q -k 3.5.1 : false' \
'-q -k 3.5 : echo 3.5.2'
'-r -k 3.4 : echo 3.4.2' \
'-r -k 3.5.1 : false' \
'-r -k 3.5 : echo 3.5.2'
run pyenv-install 3.4 3.5.1 3.5
assert_success <<OUT

View File

@@ -10,7 +10,7 @@ pyenv_install_resolve_latest() {
$(python-build --definitions | \
grep -F "${DEFINITION_PREFIX}" | \
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 \
|| true))
DEFINITION="${DEFINITION_CANDIDATES}"

View File

@@ -103,6 +103,9 @@ echo 3.8.5-latest
echo 3.8.5a2
echo 3.8.5b3
echo 3.8.5rc2
echo 3.8.5t
echo 3.8.5b3t
echo 3.8.5rc2t
echo 3.8.1
echo 3.8.1/envs/foo
!
@@ -112,3 +115,25 @@ echo 3.8.1/envs/foo
3.8.1
!
}
@test "falls back to argument with -b" {
create_executable pyenv-versions <<!
#!$BASH
!
run pyenv-latest -b nonexistent
assert_failure
assert_output <<!
nonexistent
!
}
@test "falls back to argument and succeeds with -f" {
create_executable pyenv-versions <<!
#!$BASH
!
run pyenv-latest -f nonexistent
assert_success
assert_output <<!
nonexistent
!
}

View File

@@ -46,12 +46,7 @@ load test_helper
assert_output "pyenv: cannot change working directory to \`$dir'"
}
@test "adds its own libexec to PATH" {
run pyenv echo "PATH"
assert_success "${BATS_TEST_DIRNAME%/*}/libexec:${BATS_TEST_DIRNAME%/*}/plugins/python-build/bin:$PATH"
}
@test "adds plugin bin dirs to PATH" {
@test "adds its own libexec and plugin bin dirs to PATH" {
mkdir -p "$PYENV_ROOT"/plugins/python-build/bin
mkdir -p "$PYENV_ROOT"/plugins/pyenv-each/bin
run pyenv echo -F: "PATH"

View File

@@ -155,3 +155,15 @@ exit
PYENV_VERSION=3.4 run pyenv-which python
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
}