Commit graph

27 commits

Author SHA1 Message Date
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
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
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
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
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
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
Daniel Hahler
3fd23431af Merge remote-tracking branch 'rbenv/master'
Conflicts:
	README.md
	libexec/pyenv---version
	libexec/pyenv-init
	libexec/rbenv
	libexec/rbenv-sh-shell
	libexec/rbenv-which
	test/init.bats
	test/shell.bats
2017-06-05 15:18:44 +02:00
Yamashita, Yuu
fb757053c8 Show meaningful message on missing executable (fixes #610) 2016-08-15 06:01:55 +00:00
Daniel Hahler
03ece82197 Merge remote-tracking branch 'rbenv/master'
Using `git merge rbenv/master -s recursive -X rename-threshold=5%`.

Conflicts:
	README.md
	bin/python-local-exec
	libexec/pyenv
	libexec/pyenv-help
	test/--version.bats
2015-12-14 13:47:11 +01:00
Yamashita, Yuu
8da3749648 Merge remote-tracking branch 'rbenv/master' into rbenv-20151121 2015-11-21 04:21:14 +00:00
Yamashita Yuu
f0e852553a Import rbenv changes at 7e0e85bdda 2014-12-01 00:29:26 +09:00
Daniel Hahler
a797bb6d88 Fix "pyenv: version 'system' is not installed" with pyenv which
This is a follow-up to de5c61c.
2014-11-06 17:57:17 +01:00
Daniel Hahler
de5c61cd59 Fix "version X is not installed" with multiple PYENV_VERSIONs
This was introduced when merging the rbenv upstream change
(https://github.com/sstephenson/rbenv/commit/6bb7f07d2d).
2014-10-16 02:51:07 +02:00
Daniel Hahler
a1df551bcf Merge tests and remove_from_path from rbenv
This adds the missing parts from the upstream rbenv merge:
f4652fbbf0

- e4cbf04592
- 3ee395f9b5
2014-10-13 21:14:57 +02:00
Daniel Hahler
44c20af80e Optimize pyenv-which: implement remove_from_path in Bash
This greatly improves the performance of `pyenv virtualenvwrapper_lazy`,
which happens to call pyenv-which a lot.

For profiling I've initially used:

    % zmodload zsh/zprof
    % eval "$(pyenv init -)"
    % pyenv virtualenvwrapper_lazy

    Before:
    % zprof|grep -E '(pyenv|virtualenv)'
     1)    1         754,07   754,07   58,95%    751,50   751,50   58,75%  pyenv
    21)    1           2,57     2,57    0,20%      2,57     2,57    0,20%  virtualenvwrapper_setup_lazy_loader
     1)    1         754,07   754,07   58,95%    751,50   751,50   58,75%  pyenv
           1/1         2,57     2,57    0,20%      2,57     2,57             virtualenvwrapper_setup_lazy_loader [21]
           1/1         2,57     2,57    0,20%      2,57     2,57             pyenv [1]
    21)    1           2,57     2,57    0,20%      2,57     2,57    0,20%  virtualenvwrapper_setup_lazy_loader

    After:
    % zprof|grep -E '(pyenv|virtualenv)'
     1)    1         383,30   383,30   27,97%    380,88   380,88   27,79%  pyenv
    31)    1           2,42     2,42    0,18%      2,42     2,42    0,18%  virtualenvwrapper_setup_lazy_loader
     1)    1         383,30   383,30   27,97%    380,88   380,88   27,79%  pyenv
           1/1         2,42     2,42    0,18%      2,42     2,42             virtualenvwrapper_setup_lazy_loader [31]
           1/1         2,42     2,42    0,18%      2,42     2,42             pyenv [1]
    31)    1           2,42     2,42    0,18%      2,42     2,42    0,18%  virtualenvwrapper_setup_lazy_loader

Fixes https://github.com/yyuu/pyenv-virtualenvwrapper/issues/13
2014-03-13 19:21:32 +01:00
Yamashita Yuu
8ddf8760d5 Import recent changes from rbenv 0.4.0 2014-01-02 22:45:02 +09:00
Yamashita Yuu
403f4eb7a7 Preserve original IFSs 2013-08-15 22:29:47 +09:00
Yamashita Yuu
167ff2a198 s/Ruby/Python/g; s/RBENV/PYENV/g 2013-02-06 16:05:29 +09:00
Yamashita Yuu
fca31c4307 import trivial changes from rbenv 0.4.0 2013-01-18 19:10:35 +09:00
Yamashita Yuu
da06998457 import rbenv-help from rbenv 0.4.0 2013-01-18 19:09:56 +09:00
Yamashita Yuu
5b14236bac fix "system" handling 2012-12-19 23:58:39 +09:00
FUSE Yoshio
f3ae8fd904 fix typo in function name 2012-09-09 21:45:44 +09:00
Yamashita Yuu
13122ca9bf fixed to read multiple versions from PYENV_VERSION environment variable 2012-09-07 19:16:42 +09:00
Yamashita Yuu
da659739d2 fixed pyenv shell. we cannot carry out bash array via envvars. 2012-08-31 20:12:26 +09:00
Yamashita Yuu
dff57ae35d s/PYENV_VERSIONS/PYENV_VERSION/ for backward compatibility. 2012-08-31 19:39:29 +09:00
Yamashita Yuu
8187bc84e3 search commands from python version stack.
users can use multiple python versions at once.
2012-08-31 16:09:46 +09:00
Yamashita Yuu
2457419b4a created new project.
modified rbenv source for Python and renamed to pyenv.
2012-08-31 15:30:20 +09:00