Commit graph

531 commits

Author SHA1 Message Date
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
Arcadiy Ivanov
0164e2bd59
CPython 3.9.0b4 (#1654) 2020-07-09 22:14:12 -04:00
Josh Friend
86fbc6861d
v1.2.19 2020-06-17 09:59:49 -04:00
Josh Friend
1b6657e751
v1.2.18 2020-04-02 15:28:56 -04:00
Brian Dowling
a8ca63fcc0
Update help docs to clarify multiple version(s) are allowed (#1197)
* Update help docs to clarify multiple version(s) are allowed

* Tweek version(s) help description
2020-03-19 17:35:46 -04:00
Edwin Shin
89786b909f
pyenv-version-file-read: use POSIX character sets (#1554)
Fixes #623
2020-03-13 09:08:18 -04:00
Josh Friend
3005c46643
v1.2.17 2020-03-13 08:38:35 -04:00
adrian-the-git
7097f8204e Remove duplicate help message (#1525)
The pyenv help listing offered the "commands" command twice.
2020-01-22 18:12:29 -05:00
Phil Fernandez
1487135415 fixes sed illegal byte sequence error (#1521) 2020-01-14 13:07:05 -05:00
Josh Friend
ce0be04ad4
v1.2.16 2020-01-06 08:06:57 -05:00
Josh Friend
b5f69fe58a
v1.2.15 2019-10-31 16:06:42 -04:00
wukuan405
fcf539ecef change help message from hard coding to dynamic (#1421)
## before
```Usage: pyenv <command> [<args>]

Some useful pyenv commands are:
   commands    List all available pyenv commands
   local       Set or show the local application-specific Python version
   global      Set or show the global Python version
   shell       Set or show the shell-specific Python version
   install     Install a Python version using python-build
   uninstall   Uninstall a specific Python version
   rehash      Rehash pyenv shims (run this after installing executables)
   version     Show the current Python version and its origin
   versions    List all Python versions available to pyenv
   which       Display the full path to an executable
   whence      List all Python versions that contain the given executable

See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme
```

## after
```
Usage: pyenv <command> [<args>]

Some useful pyenv commands are:
   commands    List all available pyenv commands
   local       Set or show the local application-specific Python version
   --version   Display the version of pyenv
   commands    List all available pyenv commands
   exec        Run an executable with the selected Python version
   global      Set or show the global Python version
   help        Display help for a command
   hooks       List hook scripts for a given pyenv command
   init        Configure the shell environment for pyenv
   install     Install a Python version using python-build
   local       Set or show the local application-specific Python version
   prefix      Display prefix for a Python version
   rehash      Rehash pyenv shims (run this after installing executables)
   root        Display the root directory where versions and shims are kept
   shell       Set or show the shell-specific Python version
   shims       List existing pyenv shims
   uninstall   Uninstall a specific Python version
   update      update pyenv and plugins
   version     Show the current Python version and its origin
   version-file   Detect the file that sets the current pyenv version
   version-name   Show the current Python version
   version-origin   Explain how the current Python version is set
   versions    List all Python versions available to pyenv
   whence      List all Python versions that contain the given executable
   which       Display the full path to an executable

See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme
```
2019-10-16 11:47:11 -04:00
Josh Friend
d6d6bc8bb0
v1.2.14 2019-10-15 10:15:56 -04:00
Daniel Hahler
ecd67c8223
pyenv-exec: no -a with exec to keep $PATH with system version (#1169)
Using `exec -a` caused Python to use $PATH to look up the full program name (for
`sys.executable`), which 314937d then tried to fix by changing $PATH
also for the system version.
This is not necessary anymore when not using the short name with `exec`.

This was rejected upstream
(https://github.com/rbenv/rbenv/pull/1089#issuecomment-394531896), since
it is not a problem with Ruby apparently.

Uses $PYENV_ROOT to check if system version is used.

Fixes https://github.com/pyenv/pyenv/issues/98.
Fixes https://github.com/pyenv/pyenv/issues/789.
2019-09-29 00:03:44 +02:00
Josh Friend
17f44b7cd6
v1.2.13 2019-07-09 08:56:34 -04:00
Josh Friend
a10c787f9b
v1.2.12 2019-06-11 10:18:18 -04:00
Andrew Rabert
0f596d2504 Revert "Merge pull request #1153 from cmcginty/remove-sbang"
This reverts commit 070e1c859f, reversing
changes made to 3faeda67bb.
2019-04-23 10:23:33 -04:00
Christopher Hunt
070e1c859f
Merge pull request #1153 from cmcginty/remove-sbang
Remove shebang lines from scripts for performance
2019-04-22 20:13:19 -04:00
Christopher Hunt
3faeda67bb
Merge pull request #1216 from blueyed/abs_dirname
Fix abs_dirname for relative symlinks in same directory
2019-04-18 16:34:55 -04:00
Yamashita, Yuu
abd4469920 v1.2.11 2019-04-09 00:50:15 +00:00
Yamashita, Yuu
9a98bfae48 v1.2.10 2019-04-04 01:18:57 +00:00
Daniel Hahler
3768f1d7db Revert "also remove shebang with libexec/pyenv"
This reverts commit d352b4810d.
2019-03-07 22:38:15 +01:00
Daniel Hahler
d352b4810d also remove shebang with libexec/pyenv 2019-03-07 22:35:38 +01:00
Casey McGinty
83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00
Josh Friend
3f39e8a944
v1.2.9 2019-01-10 08:19:47 -05:00
Josh Friend
80414b1b5b
v1.2.8 2018-10-30 09:42:16 -04:00
Daniel Hahler
4f21d9a2ea Fix abs_dirname for relative symlinks in same directory
Ref (abs_dirname in bats): https://github.com/sstephenson/bats/pull/224
Ref: https://github.com/rbenv/rbenv/pull/868

Fixes https://github.com/pyenv/pyenv/issues/580
2018-09-19 10:18:07 +02:00
Josh Friend
b7eea9003b
v1.2.7 2018-08-11 14:41:04 -04:00
Yamashita, Yuu
97f244fbb5 v1.2.6 2018-07-18 06:39:28 +00:00
Josh Friend
4812e0387b
v1.2.5 2018-06-27 19:21:18 -04:00
Tomoyuki Sahara
9c1d677d23 seq(1) is not available on OpenBSD. 2018-06-01 15:11:01 +09:00
Josh Friend
3faba7d47c
v1.2.4 2018-05-01 13:51:00 -04:00
Yamashita, Yuu
7973e59473 Fix rehash test to give up sooner after lock file's presence 2018-04-24 00:38:01 +00:00
Yamashita, Yuu
b1e3f13a85 Renamed variable; s/PYENV_REHASH_LOCK_TIMEOUT/PYENV_REHASH_TIMEOUT/ 2018-04-24 00:35:55 +00:00
Yamashita, Yuu
a6c15fb242 Experimental implementation to wait rehash until acquiring lock
For now the code is using traditional pseudo locking mechanism
based on `noclobber`.
2018-04-19 01:02:16 +00:00
Yamashita, Yuu
83f97ef2b3 Merge remote-tracking branch 'rbenv/master' into rbenv-20180402 2018-04-02 01:46:48 +00:00
Josh Friend
abbb606041 v1.2.3 2018-03-28 18:22:17 -04:00
Josh Friend
a8e207f330 v1.2.2 2018-02-28 16:32:37 -05:00
Victor Lim
9daf81f16e Fix https://github.com/rbenv/rbenv/issues/1065
Command `rbenv version-name > .ruby-version` will create an empty `.ruby-version` file
before running `rbenv-version-file`. This causes `rbenv-version-file` to return empty
string which in turn causes `rbenv-version-name` to return `system`.

Ensure size of `.ruby-version` is non-zero as a workaround.
2018-02-26 16:49:37 +08:00
Josh Friend
b704c4242c Update changelog for 1.2.1 release 2018-01-10 08:27:34 -05:00