Commit graph

770 commits

Author SHA1 Message Date
Ivan Pozdeev 9ecd803bff 2.4.10
Some checks failed
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 0s
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.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
2024-08-07 20:16:29 +03:00
Ivan Pozdeev 9e7010b72f 2.4.9
Some checks failed
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 0s
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.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
2024-08-05 01:54:31 +03:00
Ivan Pozdeev f17809c4b9 2.4.8
Some checks failed
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 1s
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.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
2024-07-21 07:02:45 +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
Ivan Pozdeev adf3c2bccf 2.4.7
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
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 1s
macos_build / macos_build (3.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
2024-07-06 04:44:35 +03:00
Ivan Pozdeev ca90363d73 2.4.6
Some checks failed
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.8) (push) Waiting to run
macos_build / macos_build (3.9) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-13) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 0s
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)
Some checks failed
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.8) (push) Waiting to run
macos_build / macos_build (3.9) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-13) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 16s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.8) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 1s
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)
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.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-22.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.8) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.9) (push) Has been cancelled
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
Ivan Pozdeev 2c2c7616e2 2.4.5 2024-06-30 20:58:02 +03:00
Ivan Pozdeev 9546f729f7 2.4.4
Some checks failed
macos_build / macos_build (3.11) (push) Has been cancelled
macos_build / macos_build (3.10) (push) Has been cancelled
macos_build / macos_build (3.12) (push) Has been cancelled
macos_build / macos_build (3.8) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-11) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-12) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-22.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.8) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.9) (push) Has been cancelled
2024-06-27 23:21:27 +03:00
Ivan Pozdeev 756aad2613 2.4.3 2024-06-12 22:48:15 +03:00
Ivan Pozdeev 0963c8ac02 2.4.2 2024-06-08 23:49:46 +03:00
Ivan Pozdeev aabaa89243 2.4.1 2024-05-09 14:31:11 +03:00
Ivan Pozdeev 21eef94ea0 2.4.0 2024-04-07 21:29:02 +03:00
Ivan Pozdeev b80d5fd28d 2.3.37 2024-04-07 20:48:40 +03:00
Alex Hedges 02e1d4a293
Handle case where pyenv-commands --sh returns nothing (#2908)
In exceptional cases (custom installation, malfunctions elsewhere), `pyenv-commands --sh` may return nothing.
In non-Fish, this would cause "syntax error near unexpected token `)'" in `pyenv()`.

Bash does not allow to specify a `case` option that would never match.
This works around it by defaulting to `/`. Commands, being filenames, can never match it.
In Fish, nothing needs to be done: it apparently does interpret a `case` without argument as one that never matches.
2024-02-26 00:07:52 +03:00
Ivan Pozdeev 5e4879a2bc v2.3.36 2024-02-14 00:58:44 +03:00
Anton Petrov dfde39650e
v2.3.35 2023-12-08 13:22:44 +03:00
Anton Petrov 99d74e78f7
v2.3.34 2023-12-06 06:56:03 +03:00
Anton Petrov 2fb5b9e9a3
v2.3.33 2023-11-27 15:54:43 +03:00
Anton Petrov d312301099
v2.3.32 2023-11-12 18:53:11 +03:00
native-api fb2c65f149
Make pyenv init output insertable to startup files (#2838) 2023-11-12 12:41:13 +03:00
native-api 087793a660
Make adding $PYENV_ROOT/bin to PATH independent of other software (#2837)
Fixes breakage in WSL with Pyenv-win installed in the host system;
doesn't affect other supported installation scenarios.
2023-11-12 11:58:17 +03:00
Anton Petrov 54f7a7c046
v2.3.31 2023-10-22 12:35:53 +03:00
Anton Petrov 9c8f92cf4e
v2.3.30 2023-10-16 21:36:46 +03:00
Anton Petrov bb38acd994
v2.3.29 2023-10-06 08:05:47 +03:00
Anton Petrov 28e7000b48
v2.3.28 2023-10-02 19:54:39 +03:00
Anton Petrov c844b332ca
v2.3.27 2023-09-17 10:48:10 +03:00
Anton Petrov bdfb80cc12
v2.3.26 2023-09-07 11:36:40 +03:00
Anton Petrov 7ec5c30451
Update pyenv---version 2023-08-27 01:29:50 -07:00
Anton Petrov 791ae90aef
2.3.24 2023-08-11 02:20:36 -07:00
Anton Petrov e908606554
v2.3.23 2023-07-22 16:08:35 +03:00
Anton Petrov 64c70feb08
Update pyenv---version 2023-07-08 22:37:24 +03:00
Anton Petrov ba8b58f90d
2.3.21 2023-06-20 13:52:17 +03:00
native-api fe76b05445
Fix occasional 'libexec/pyenv-latest: line 39: printf: write error: Broken pipe' (#2729) 2023-06-20 03:04:06 +03:00
Anton Petrov 43f40eca05
v2.3.20 2023-06-12 10:33:36 +03:00
Anton Petrov e79dd97afa
v2.3.19 2023-06-08 12:18:16 +03:00
Anton Petrov 3fa5812bfc
Update pyenv---version 2023-05-25 11:23:39 +03:00
Kevin Schoedel 920ef1456a
Support ksh alternative names (#2697)
* Support ksh versions

Korn shell had two major versions: ’88 and ’93. Some systems have
ksh installed under the name `ksh93`. A few systems (maybe only
Solaris now) also have a `ksh88`. A few others use the `pdksh` (’88)
or `mksh` (’93) implementations, originated before ksh was open source.

Limit to currently-used versions

---------

Co-authored-by: Kevin Schoedel <kps@datatravelandexperiments.com>
2023-05-13 01:24:57 +03:00
native-api 20189ff06f
Fix not showing symlink contents for unselected versions in pyenv versions (#2675) 2023-04-08 01:12:09 +03:00
Anton Petrov 9a4f9c2511
2.3.17 2023-04-06 06:58:52 +03:00
Shengqi Chen b1ee6c93c4
Try locate readlink first in pyenv-hooks, fix #2654 (#2655)
* Remove all use of `greadlink`, fix #2654

Signed-off-by: Harry Chen <i@harrychen.xyz>

* revert greadlink back in tests

---------

Signed-off-by: Harry Chen <i@harrychen.xyz>
Co-authored-by: Anton Petrov <anton.a.petrov@gmail.com>
2023-03-28 11:25:27 +03:00
Petrov 9fad1f46c5
Update pyenv---version 2023-03-24 08:26:20 +03:00
Anton Petrov f507d08064
Update pyenv---version 2023-03-10 09:03:23 +03:00
Anton Petrov 904dd5f828
Update pyenv---version 2023-03-01 08:25:31 +03:00
Florian Schüller 68918e69b7
Support for BusyBox version of `head' (#2629) 2023-02-22 20:11:48 +03:00
Rafał 86a4423bbb
Fix indentation (#2620) 2023-02-16 00:10:36 +03:00
Anton Petrov 0ab9683e58
2.3.13 2023-02-15 08:15:35 +03:00
laggardkernel a7b181c3ca Fix link resolving in pyenv-versions
Co-Authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2023-02-06 19:22:38 +03:00
Ivan Pozdeev 72c5b034ca Avoid the need to filter out envs in `pyenv-latest' 2023-02-02 18:24:17 +03:00
Ivan Pozdeev 446411dc64 Streamline `pyenv-versions --bare'
Achieves a ~20% speedup.
As it's used in pyenv-latest, this affects all version lookups
2023-02-02 18:15:47 +03:00
Ivan Pozdeev 9fe80f28e5 Add pyenv versions' option to skip envs for pyenv-latest' 2023-02-02 18:15:13 +03:00
native-api 9248255f70
Show symlink contents in non-bare `pyenv versions' (#2609)
* Change other tests to use the newly-created convenience function
2023-02-02 17:24:19 +03:00
native-api 368e04f3fa
Fix pyenv-latest to ignore virtualenvs (#2608)
* Add test, exclude alphas as well
2023-02-02 15:15:16 +03:00
Anton Petrov 76e93b073e
2.3.12 2023-01-30 08:19:43 +03:00
native-api c20fc7bd6a
Fix pyenv which to support auto-resolved prefixes (#2601)
* Resolve version name that hooks see
* Avoid a 2nd iteration over configured versions
2023-01-22 18:22:26 +03:00
Anton Petrov 906246da4c
2.3.11 2023-01-15 12:43:34 +03:00
Anton Petrov 579c34e570
2.3.10 2023-01-10 19:03:00 +03:00
Ian Chen f897c50202
Fix non-bash output while detecting shell (#2561)
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2022-12-25 02:35:03 +03:00
Anton Petrov 2bb59169db
2.3.9 2022-12-19 07:52:52 +03:00
Anton Petrov 3f0dd1962f
2.3.8 2022-12-08 10:07:26 +03:00
Anton Petrov 58bbbf8880
Merge pull request #2540 from ianchen-tw/detect-shell
Export detected shell environment in pyenv-init
2022-12-02 18:07:11 +03:00
Ian Chen c1674cd552 Detect shell 2022-12-02 00:22:50 +08:00
Anton Petrov 59c560893a
2.3.7 2022-12-01 10:15:45 +03:00
Isaac Levy cc56f76733
Add --no-push-path option (#2526)
In some advanced shell setups, the order of custom-added PATH entries is important.
We disregard it by default, always pushing shims to the front of PATH,
to ensure that Pyenv works even in poorly maintained shell environments
and with minimal hassle for non-export users
(an attempt to do the opposite (#1898) has ended in a disaster).
Some advanced users are however ready and able to carefully maintain their environment
and deal with breakages and inconvenience. This option is for them.
2022-11-19 00:01:59 +03:00
native-api ed1083ec27
Fix resolution of a name that's a prefix of another name (#2521) 2022-11-10 04:46:14 +03:00
Rust Saiargaliev 6da0e89207 2.3.6 2022-11-03 09:26:31 +01:00
Ivan Pozdeev 4a031504db Document prefix auto-resolution et al.
* Document listing available versions in the tutorial (#1677)
* Reflect 3.7.15's extended support
* Document using development head with Homebrew
* Structurize the Upgrading section
* Fix Pyenv-latest documentation
2022-10-30 05:28:53 +03:00
native-api a12f947cc3
Auto-resolve prefixes to the latest version (#2487) 2022-10-30 03:38:40 +03:00
native-api 0b5e16add3
Fix invalid syntax error in pyenv init - if PYENV_ROOT has spaces (#2506) 2022-10-29 23:08:02 +03:00
Ivan Pozdeev ea6085e3f3 2.3.5 2022-10-08 20:49:49 +03:00
Ivan Pozdeev 2b22145670 2.3.4 2022-09-04 01:54:33 +03:00
James Stronz 47b0ce77c0
Re-allow paths in .python-version provided that they resolve to within the versions dir (#2442)
* Fixes #2430 while still preventing CVE-2022-35861
* Adds a skipped version message to stderr

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2022-09-03 22:37:53 +03:00
Ivan Pozdeev 37a6070855 2.3.3 2022-08-02 23:59:30 +03:00
James Stronz 22fa683571
CVE-2022-35861: Fixed relative path traversal due to using version string in path (#2412) 2022-07-17 01:01:04 +03:00
Pedro Fonini fdaeaf1f97
Use version sort in pyenv versions if available (#2405) 2022-07-10 23:00:51 +03:00
Ivan Pozdeev 304515f2cd 2.3.2 2022-06-30 16:04:22 +03:00
Ivan Pozdeev 8ff6507f80 2.3.1 2022-05-29 19:50:13 +03:00
native-api e676fde990
Fix endless loop in pyenv init - under SSH in some shell setups (#2374) 2022-05-18 16:15:05 +03:00
SADIK KUZU 169321b3e6
README.md, CHANGELOG.md, libexec/pyenv-help: Fix typos 2022-05-08 09:46:47 +03:00
Ville Skyttä c3fd96c429
Version file read improvements (#2269)
* Don't bother reading empty version files
* Implement version file read in pure bash
Is faster with usual sized version files, slower with degenerate cases.
2022-05-06 19:51:51 +03:00
Ivan Pozdeev 2fd7be0453 2.3.0 2022-05-04 03:30:52 +03:00
Ivan Pozdeev 6d4365a696 Make pyenv init --path usable as a pyenv init - substitute
We're going to eliminate the need to mandatorily use `pyenv init --path`.
We can't delete it yet for backward compatibility.
Besides, there's one other use case for it: to enable shims but without
shell integration, e.g. for noninteractive shells.

To be a full-fledged replacement for `pyenv init -` however,
it needs to do rehashing.
2022-05-02 19:07:24 +03:00
Ivan Pozdeev 8439f8e187 Simplify init scheme; update & clarify the README
Now the setup is to add to both rc and profile:
1) set PYENV_ROOT
   (can do it unconditionally -- since if you change it,
   you need to update all places anyway since any of them can be run first)
2) Add `pyenv` to PATH if not already there
3) eval "$(pyenv init -)"

Not a breaking change, old setup will continue to work.
2022-05-02 19:07:24 +03:00
Josh Friend 3a95c969e1
v2.2.5 Add new CPython versions 2022-03-16 16:58:43 -04:00
Ville Skyttä ee6ef20859
docs(pyenv-prefix): note support for multiple versions (#2270) 2022-03-09 05:33:01 +03:00
Anton Petrov 6f7a29c3f4
Update pyenv---version 2022-01-27 18:46:17 +03:00
Anton Petrov 8675031879
Update pyenv---version 2021-12-22 09:48:21 +03:00
Anton Petrov dc3a201301
Update pyenv---version 2021-11-22 22:33:10 +03:00
Josh Friend 23dfe75b73
v2.2.1 2021-11-20 09:04:59 -05:00
Oğuzhan Çelikarslan 552d943762
Fix typos in command examples (#2147) 2021-11-09 09:50:29 +03:00
Anton Petrov 066c05336f
Update pyenv---version 2021-10-27 11:15:57 +03:00
Anton Petrov 05ca057bb2
Update pyenv---version 2021-10-05 17:32:37 +03:00
Ivan Pozdeev e28661c7e2 Fix random "broken pipe" 2021-09-21 07:43:58 +03:00
Anton Petrov dcfd715603
Update pyenv---version 2021-09-20 20:08:06 +03:00
Ivan Pozdeev eb89256f59 Remove the sample code from pyenv init
since there proved to be to many cases to fit
2021-09-19 00:27:03 +03:00
native-api 4f689cdf83
Allow system Python in sbin (#2065)
Arch Linux has Python is sbin as well as bin
2021-09-15 20:00:49 +03:00
Pamela McA'Nulty 1c90a0f864
Prevent duplicate PATH entries when bin_path/.. is the same as PYENV_ROOT (#2045) 2021-09-15 01:09:50 +03:00
Anton Petrov 2d64fb1cb9
Update pyenv---version 2021-08-31 08:44:12 +03:00
Anton Petrov e9c8dfc197
Update pyenv---version 2021-08-23 10:34:26 +03:00
Anton Petrov cef86ce462
Update pyenv---version 2021-07-25 11:54:16 +03:00
Anton Petrov 3a5a21ee05
Update pyenv---version 2021-07-03 10:10:58 +03:00
native-api f7754ae6a4
Remove PATH warning (#2001)
* In some cases (Ubuntu), `pyenv init -` has to be run before `pyenv init --path`.
* The warning has served its purpose by now.
2021-07-03 09:48:13 +03:00
Anton Petrov 20df064204
Update pyenv---version 2021-06-27 11:25:53 +03:00
Hugh Rawlinson d2bd4c06ef
Suggest that fish users init in interactive mode
...rather than login mode.

I couldn't get rid of the warning that `pyenv init -` no longer sets path until I did this. It looks like setting only on the login shell wasn't enough to hide the warning in other shells I opened. This fits with [how rbenv does the same thing](https://github.com/rbenv/rbenv/blob/master/libexec/rbenv-init#L74).

I'm way out of my depth here, so someone who knows about shell types should definitely review this.
2021-06-27 00:22:59 +02:00
native-api 859b260764
Check for shims in path with pure Bash (#1978)
Closes https://github.com/pyenv/pyenv/issues/1921
2021-06-10 03:51:59 +03:00
Anton Petrov f81bffc95e
2.0.1 2021-06-06 16:25:48 +03:00
Anton Petrov 1270ca6b0b
2.0.0 2021-05-23 20:01:43 +03:00
Anton Petrov 4ce52bd333
2.0.0-rc1 2021-05-20 23:20:22 +03:00
Ivan Pozdeev ddf952ab2d Allow for cases where user might've aliased some programs
The $(type -p | head -1) construct expects to always get a path, so need to ignore such aliases with -P

Closes https://github.com/pyenv/pyenv/issues/1662
2021-05-17 10:48:46 +03:00
Ivan Pozdeev e0d109c227 Include a Bash automated install option 2021-05-13 22:58:07 +03:00
native-api 0d07cda969
Update install instructions for Bash and Zsh (#1920)
* Update install instructions for Bash and Zsh

* Synchronize README.md with `pyenv init`
* Add a ~/.bash_profile note
* Concatenate shims activation into installation for brevity
  (Pyenv can't be used meaningfully without shims anyway)
  Otherwise, we'd need to duplicate all the ~/.profile shenanigans in both sections
* Update based on feedback
* Proofread
2021-05-13 22:57:14 +03:00
Fabian Homborg 0d2fb35cee
Fix fish installation instructions (#1916) 2021-05-11 22:35:15 +03:00
Ivan Pozdeev da9392fd09 Add a hint for cases when ~/.profile sources ~/.rc
Our ~/.rc logic must run after the ~/.profile one
2021-05-10 04:39:45 +03:00
Ivan Pozdeev 13deda8875 Place full shell configuration instructions into pyenv init
including initial PATH and PYENV_ROOT entries.
The migration hint proved to be unclear to users without them.
2021-05-10 00:08:46 +03:00
Ivan Pozdeev aab562c696 Add a warning about needing to restart the entire login session
E.g. for a GUI session, ~/.profile is executed by the GUI login "shell" at its startup
so one needs to fully log out and log back in.
Before that, the change would only be seen by shells explicitly started as login shells.
2021-05-07 16:21:17 +03:00
Ivan Pozdeev 3e3f40fefc Warn users to add pyenv init --path to ~/.profile
To facilitate migration
2021-05-05 03:04:52 +03:00
Ivan Pozdeev 7838707595 Separate startup logic into PATH and the rest
PATH manipulation should be done in ~/.profile rather than ~/.*rc since .rc can be sourced multiple times
2021-05-05 03:04:51 +03:00
Ivan Pozdeev 5998f4f7ab Refactoring: make logic more fit for rearrangement
With functions, we have more leeway in what to call
2021-05-05 01:25:11 +03:00
Anton Petrov 6656066d4f
1.2.27 2021-05-01 08:41:27 +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
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 80067632b6
1.2.26 2021-04-05 14:25:25 +03:00
Anton Petrov 35aa7e52ce
1.2.25 2021-04-04 14:42:16 +03:00
Ville Skyttä 61d702405d feat(init): strip -<suffix> when autodetecting shell
For example bash-5.1, bash-static.
2021-03-23 22:10:55 +02:00
Anton Petrov 332772abc5
1.2.24 2021-03-19 10:06:26 +03:00
Anton Petrov afb14d2072
Merge pull request #1814 from native-api/rm_script_dir
Remove the "Using script's directory as PYENV_DIR if shim is invoked with a script argument" feature
2021-03-09 14:36:12 +03:00
Ville Skyttä f06fb60b1f Make work in nounset (-u) mode 2021-02-23 22:29:56 +02:00
Anton Petrov f31a06dc19
Added --nosystem argument
Added --nosystem argument to skip the system environment when searching for an executable.
2021-02-22 12:21:02 +03:00
Josh Friend 5f62ad7680
v1.2.23 2021-02-17 11:32:41 -05:00
tuzi3040 d51999adf5
Fix 'sed: RE error: illegal byte sequence' (#1714)
... by unsetting `LC_ALL` and passing `LC_CTYPE=C` to `sed`.

This commit fixes issue #1454.
2021-02-17 11:12:45 -05:00
Ivan Pozdeev 131e44afcb Remove the "Using script's directory as PYENV_DIR if shim is invoked with a script argument" feature
It's impossible to 100% reliably extract the script argument from the command line for all and unknown Python versions and implementations
2021-02-16 23:59:08 +03:00
Ivan Pozdeev a6b0a2846e Revert "shims: handle symlinked scripts, via new PYENV_FILE_ARG"
This reverts commit 493f036928.

# Conflicts:
#	libexec/pyenv
2021-02-16 23:53:05 +03:00
Ivan Pozdeev 00f7d6249a Fix not printing asterisk for current version in Bash 3 2021-02-14 15:50:36 +03:00
Ivan Pozdeev 9309050864 Use a better PS4 as recommeneded by Bash Hackers Wiki
it allows to see functions as well as lines, therefore making it possible to see the control flow
2021-02-10 22:42:18 +03:00
Anton Petrov 89d3d0c33d
Merge pull request #1655 from draeath/master
"system" python - support cases where python3, python2 is in PATH but not python
2021-02-10 20:45:41 +03:00
Anton Petrov 50a48764ff
Merge pull request #1797 from rharish101/search_system
Added fallback to system executable
2021-02-07 19:37:26 +03:00
Ville Skyttä c4e556eded versions: use associative array to hold current versions
"hyperfine pyenv-versions" before with my bash 4.4:

Time (mean ± σ):    81.7 ms ±   2.2 ms  [User: 67.8 ms, System: 15.7 ms]
Range (min … max):  78.3 ms …  87.2 ms  34 runs

After:

Time (mean ± σ):    70.6 ms ±   2.4 ms  [User: 55.6 ms, System: 16.9 ms]
Range (min … max):  67.9 ms …  78.9 ms  41 runs
2021-01-29 19:54:25 +02:00
Ville Skyttä a804887307 rehash: use associative array to hold registered shims
"hyperfine pyenv-rehash" before on my bash 4.4:

Time (mean ± σ):   172.8 ms ±   8.2 ms [User: 185.0 ms, System: 24.8 ms]
Range (min … max): 164.2 ms … 198.4 ms 15 runs

After:

Time (mean ± σ):   113.8 ms ±   2.8 ms [User: 127.1 ms, System: 26.1 ms]
Range (min … max): 108.0 ms … 117.6 ms 25 runs
2021-01-29 19:54:25 +02:00
Harish Rajagopal cdecf14535
Added fallback to system executable
If pyenv doesn't find an executable for the current version/virtualenv,
then search the "system" version as a fallback.
2021-01-29 13:01:21 +01:00
Ville Skyttä b938abdea1 rehash: preserve existing $PYENV_REHASH_TIMEOUT semantics
Try for that long no matter what the sleep step available is.
2021-01-28 16:00:59 +02:00
Ville Skyttä c0ea15226d rehash: try to sleep in 0.1 sec steps when acquiring lock 2021-01-28 16:00:59 +02:00
Yamashita, Yuu dc70546565
v1.2.22 (fixes #1760) 2021-01-10 12:52:22 +09:00
Josh Friend 806b30d6ce
v1.2.21 2020-10-08 20:59:02 -04:00
cornfeedhobo cadebd8e65
Search for plugins in PYENV_DIR and PYENV_ROOT (#1697) 2020-10-01 21:33:34 -04:00
M. Smits 71d2e4549e
Updated documentation pyenv init for fish shell comform to readme. (#1703) 2020-10-01 21:28:29 -04:00
Smiler Lee 592271b86f
Fix 'sed: RE error: illegal byte sequence' (#1670)
... which is caused by `realpath.dylib` containing illegal UTF-8 byte sequence, and `LC_CTYPE` won't take effect if `LC_ALL` happens to be set to something other than `C`.

This commit fixes issue pyenv/pyenv#1454.

Ref: https://stackoverflow.com/a/23584470
2020-10-01 20:16:55 -04:00
Ivan Pozdeev f77c2d7eab Detect Py2 presence as well 2020-09-21 18:53:09 +03:00
Arcadiy Ivanov 0164e2bd59
CPython 3.9.0b4 (#1654) 2020-07-09 22:14:12 -04:00
Paul Bransford 4d762bca7b fix 'system' python to be present if 'python3' is on path but not 'python' 2020-07-07 18:39:52 -04:00