Yamashita, Yuu
a5d406a545
Add tests for extra envs in PYENV_ROOT
2015-12-04 02:41:43 +00:00
Yamashita, Yuu
9c49fcd734
Fix broken tests
2015-12-04 02:33:37 +00:00
Yamashita, Yuu
6e91d75069
Stop showing message about pyenv virtualenv-init on activate ( #122 )
...
`pyenv virtualenv-init` is just an option. Always showing message about
it would be too much to do.
2015-12-02 23:49:07 +00:00
Yamashita, Yuu
fa11d65bf6
Add tests for conda create
2015-11-27 13:36:33 +00:00
Yamashita, Yuu
48b491f343
Add test helpers for virtualenv, pyvenv and conda
2015-11-27 13:31:00 +00:00
Yamashita, Yuu
6a2b77ed5b
Fix tests
2015-11-27 12:36:59 +00:00
Yamashita, Yuu
116e133c90
Activate a virtualenv of current version if specified version is not a virtualenv
...
```sh
% pyenv versions
system
* miniconda3-3.16.0 (set by PYENV_VERSION environment variable)
miniconda3-3.16.0/envs/venv
% pyenv activate venv
pyenv-virtualenv: deactivate miniconda3-3.16.0
pyenv-virtualenv: activate miniconda3-3.16.0/envs/venv
```
2015-11-27 00:04:05 +00:00
Yamashita, Yuu
1edff311d5
exits as error if the virtual environment doesn't have python executable ( #104 )
...
conda's environment might not have `python` executable. If the prefix
doesn't contain `python` in it, `pyenv-which` might be ran into infinite
loop if some of `which` hooks invoke `pyenv-virtualenv-prefix`.
2015-11-26 10:34:32 +00:00
Yamashita, Yuu
aae07d1318
Deactivation before activation should not return as non-zero ( fixes #116 )
2015-11-26 09:15:02 +00:00
Yamashita, Yuu
5f87786adf
Remove PYENV_DEACTIVATE ( fixes #121 )
...
This means that pyenv-virtualenv will not allow manual deactivation of
virtualenv if pyenv-virtualenv-init is enabled. This must be acceptable
since the activation of virtualenv is just setting of environment
variables in current implementation.
2015-11-23 13:33:31 +00:00
Yamashita, Yuu
59bc189bec
Basically / should not be allowed as a part of name of virtualenv
2015-11-23 09:38:39 +00:00
Yamashita, Yuu
83bc6a49e4
Restore variables set by activate script of virtualenv properly ( #150 )
...
The `activate` script does't export the variables of `_OLD_VIRTUAL_*`,
most the deactivation code needed to be moved to `sh-deactivate`.
2015-11-12 13:45:33 +00:00
Yamashita, Yuu
25bf4a6155
Unset environment variables to pass tests while activated
2015-11-12 00:27:02 +00:00
Yamashita, Yuu
bb623bd8bf
Prevent removing symlinks bound to different version ( #106 )
2015-11-09 05:57:16 +00:00
Yamashita, Yuu
ee18ffac9f
Change prompt after activate ( #52 )
2015-11-09 01:57:17 +00:00
Yamashita, Yuu
c1b9238cbe
Reject creating a virtualenv named system ( yyuu/pyenv#475 )
2015-11-08 23:44:58 +00:00
Yamashita, Yuu
bdd52a79cd
Revert PYENV_DEACTIVATE for backward compatibility
2015-11-08 08:34:43 +00:00
Yamashita, Yuu
d2edf5dddb
Fix tests
2015-11-08 06:32:34 +00:00
Yamashita, Yuu
0fa5de07c9
fix broken tests
2015-11-06 18:26:23 +00:00
Yamashita, Yuu
6523d00f9c
Merge pull request #108 from yyuu/hook-source-activate
...
dd a script to hook `source activate` for Anaconda/Miniconda
2015-11-06 17:15:12 +09:00
Yamashita, Yuu
ad2ada84ab
fix broken tests
2015-11-06 06:28:22 +00:00
Yamashita, Yuu
270c379a32
rename tests
2015-11-06 06:15:53 +00:00
Yamashita, Yuu
e489163f92
Merge pull request #106 from yyuu/uninstall-rehash-envs
...
Support uninstall and rehash of virtual environments created in `envs`
2015-11-05 18:40:46 +09:00
Yamashita, Yuu
5c9909f4c1
Merge pull request #107 from yyuu/create-virtualenv-in-envs
...
Create virtualenv inside `envs` directory as similar as Anaconda
2015-11-05 18:40:25 +09:00
Yamashita, Yuu
07b31aa2f6
Add tests for virtualenv-delete
2015-11-05 05:42:10 +00:00
Yamashita, Yuu
c6a705b1d9
Setup CONDA_DEFAULT_ENV only if conda executable exists
2015-11-05 01:49:04 +00:00
Yamashita, Yuu
8038659299
Create virtualenv inside envs directory as similar as Anaconda
2015-11-04 14:56:01 +00:00
Yamashita, Yuu
64ceee5c8e
Stop using virtualenv's activate script ( #69 )
2015-11-04 13:50:17 +00:00
Yamashita, Yuu
2ae921c253
Treat all versions with activate script as a virtual environment
2015-11-04 13:07:46 +00:00
Yamashita, Yuu
72cf0e1b1b
v20151103
2015-11-03 13:36:45 +00:00
Daniel Hahler
f594876f31
init: zsh: prepend hook to precmd_functions
...
This makes sure that $VIRTUAL_ENV is handled already in other precmd
functions, especially your prompt.
2015-11-02 17:52:59 +01:00
Bartosz Janda
f657fad926
Passing return value from executed command.
2015-10-15 20:37:00 +02:00
Yamashita, Yuu
6a6947659a
v20151006
2015-10-06 14:06:58 +00:00
Yamashita, Yuu
249759aa04
add foolproof for -p argument.
...
find proper source version from pyenv if the given executable is only
basename or is a shim script.
2015-10-06 13:53:43 +00:00
Jeremy
d86fd13797
Fix test to not have quotes expected in command eval for Fish
2015-09-24 14:39:24 +02:00
Yamashita, Yuu
7b34f7234e
Fix broken test
2015-07-20 19:14:57 +09:00
Yamashita, Yuu
e535faea4d
Ignore user's site-packages on ensurepip/get-pip ( #89 )
...
https://www.python.org/dev/peps/pep-0370/
2015-07-20 19:05:52 +09:00
Yamashita, Yuu
90531a6a48
v20150719
2015-07-19 18:22:34 +09:00
Yamashita, Yuu
b32d357353
Add tests for conda
2015-07-19 15:01:04 +09:00
Yamashita, Yuu
cdbf7c9972
activate "root" environment of anaconda/miniconda if environment name is not given
2015-07-19 04:19:34 +09:00
Yamashita, Yuu
25395f0331
activate: look for a conda environment if given name is not a pyenv's prefix
2015-07-19 03:38:48 +09:00
Yamashita, Yuu
be6701e7b6
Fix Error: too many arguments. on deactivating anaconda env
2015-07-19 01:04:23 +09:00
Yamashita, Yuu
e1523811fb
fix broken test
2015-07-19 00:08:12 +09:00
Daniel Hahler
8ca45c0e0a
init: fix shell detection when invoked from a script
...
- fixes `ps` command to lookup parent process
- adds `assert_output_contains_not` test helper
Ref: https://github.com/yyuu/pyenv/issues/373
2015-06-26 20:47:08 +02:00
Yamashita Yuu
e261806f96
Skip installing setuptools explicitly with using ez_setup.py ( yyuu/pyenv#381 )
...
It will be done by `get-pip.py` and we don't have to do anything explicitly.
2015-05-27 00:06:16 +09:00
Yamashita Yuu
9a52f9fb5d
v20150526
...
First release after my son's birth....
2015-05-27 00:01:13 +09:00
Yamashita, Yuu
0ca01826e8
Merge pull request #78 from blueyed/shell-no-note-if-init
...
activate: do not display note if initialized already
2015-05-17 12:23:37 +09:00
Yamashita, Yuu
4fa9c7b220
Merge pull request #75 from blueyed/fix-zsh-typeset-precmd_functions
...
Use `typeset -g` with `precmd_functions`
2015-05-17 12:12:12 +09:00
Daniel Hahler
2571a2b973
activate: display setup instructions only with PYENV_VIRTUALENV_INIT=0
...
This fixes displaying the note, in case "init" has been run manually
and/or the init is not in the expected place.
It removes the unnecessary calls to "grep".
pyenv-virtualenv-init will look at `$PYENV_SHELL` now, too.
Tests have been adjusted/fixed.
2015-05-10 17:47:46 +02:00
Josh Hagins
5953ddaf64
Ignore failure of pyenv activate
...
When the current pyenv environment is not a virtualenv, this line
exits with a return code of 1. This is annoying for those of us
who report the last return code in our own PROMPT_COMMAND, so
ignore the output of `pyenv activate` if we're not currently using
a virtualenv.
2015-03-18 22:30:19 -04:00
Daniel Hahler
2ab9483116
Use typeset -g with precmd_functions
...
This makes it possible to use `eval "$(pyenv virtualenv-init -)"` from a
function.
2015-03-14 02:37:14 +01:00
Yamashita Yuu
32e5a73345
v20150119
2015-01-19 00:53:19 +09:00
Tony Wang
e04a6f88fe
fix wrong output in test in fish, refs 240a1de
...
"(any command)" is not supported in test in fish, we have to set a
variable and then use that
2015-01-06 11:10:43 +08:00
Tony Wang
cc7c9d22b5
fix failed tests running under fish
2015-01-05 23:28:14 +08:00
Tony Wang
240a1de6e5
fix warns for virtualenv-init corner case on fish
...
The situation is when in a directory containing python binary,
`pyenv prefix' will return empty (caused by `pyenv which' returning
"./python"). This change adds quotes for `test', otherwise `test' will
warn about missing argument.
2015-01-05 23:23:43 +08:00
Yamashita Yuu
191e806ba9
shell version set in activate should be unset in deactivate ( #61 )
2014-12-23 11:21:52 +09:00
Yamashita Yuu
ad0fa82329
Fix broken fish test ( #60 )
2014-12-16 23:04:35 +09:00
Yamashita Yuu
e774464ced
ignore error from pyenv-version-name since it might fail if there is configuration error ( yyuu/pyenv#291 )
2014-12-14 14:15:18 +09:00
Yamashita Yuu
ad644e83b5
v20141106
2014-11-06 09:47:54 -08:00
Yamashita Yuu
58e93f9e0d
Fix test which has broken by 2060c43387
2014-10-27 11:04:42 +09:00
Yamashita Yuu
a02eb0a396
Calling create_symlinks after ensurepip is unnecessary
...
Install script of setuptools-6.1/pip-1.5.6 will create those links if needed
2014-10-19 10:59:52 +09:00
Yamashita Yuu
1d36ef2f68
v20141012
2014-10-12 21:55:47 +09:00
Yamashita Yuu
e655abbd41
Fix broken tests ( #47 )
2014-10-12 21:37:10 +09:00
Daniel Hahler
86046fd4e8
Do not allow whitespace in VIRTUALENV_NAME
...
While this could work in general, it fails in the end, because
whitespace is not allowed/supported in the shebang line with the
scripts in the created virtualenv.
2014-09-03 23:28:46 +02:00
Yamashita, Yuu
2cc21f112c
Merge pull request #40 from s0undt3ch/master
...
Fix weird bash code issue which made bash complain about "then"
2014-08-14 10:03:35 +09:00
Pedro Algarvio
81736da905
Indent to 2 spaces.
2014-08-13 19:51:22 +01:00
Pedro Algarvio
7304608e0f
Adapt tests to new output
2014-08-13 03:58:32 +01:00
Yamashita Yuu
c9bcef656c
Use . instead of source to support POSIX sh
2014-08-13 10:54:18 +09:00
Yamashita Yuu
a3c86f013b
Deactivate virtualenv even if it has been activated manually
2014-07-11 20:24:58 +09:00
Yamashita Yuu
7aa5d13633
v20140705
2014-07-05 17:26:53 +09:00
Yamashita Yuu
aef2546319
Fix broken fish's if statement
2014-07-05 07:30:53 +09:00
Yamashita Yuu
6b4d6249a0
No need to use eval in fish init script
2014-07-05 07:27:12 +09:00
Yamashita Yuu
0de2cdbbc3
Should not persist PYENV_DEACTIVATE after failed attempt to deactivate and activate
2014-07-05 06:53:46 +09:00
Yamashita Yuu
abfda4bac9
Fix issues with manual activation of virtual environments ( #34 )
2014-07-04 22:55:06 +09:00
Yamashita Yuu
be18fd294e
Fix virtualenv-prefix when the version is system
2014-07-04 22:44:08 +09:00
Yamashita Yuu
d4ce853e94
Display information on automatic (de)?activation
2014-07-04 22:44:05 +09:00
Yamashita Yuu
58ed045796
s/QUIET/NOERROR/g
2014-07-04 22:10:35 +09:00
Yamashita Yuu
c2b5bbd19a
Fix fish syntax error at else
2014-07-04 20:51:31 +09:00
Yamashita Yuu
f0c400b669
Add --quiet option to activate and deactivate
2014-07-04 20:47:10 +09:00
Yamashita Yuu
5b3b909089
Exit as error on deactivation failures
2014-07-04 20:33:37 +09:00
Yamashita Yuu
0b5e0cf592
Unset shell version only if the deactivate has invoked
2014-07-04 20:27:55 +09:00
Yamashita Yuu
c09a6d3d6c
Exit as error on activation failures
2014-07-04 20:23:29 +09:00
Yamashita Yuu
08b4c94f85
Use PYENV_DEACTIVATE to store which virtualenv has been deactivated ( #32 )
2014-06-30 23:03:37 +09:00
Yamashita Yuu
7079cbe979
Fix broken setenv in pyenv-virtualenv-init
2014-06-30 21:35:53 +09:00
Yamashita Yuu
bad4507541
Run _ensurepip_ after the every creation of virtualenv/pyvenv
2014-06-28 01:03:33 +09:00
Yamashita Yuu
7c8805c343
Use same _ensurepip_ logic as python-build
2014-06-28 00:49:04 +09:00
Yamashita Yuu
ea18a1b283
v20140615 ( fixes #26 )
2014-06-15 20:20:29 +09:00
Yamashita Yuu
dcb5371f07
Merge branch 'workaround-for-pyenv-which-ext'
2014-06-15 20:16:25 +09:00
Yamashita Yuu
dc12a345d8
Workaround for the issue with pyenv-which-ext (refs #26 )
2014-06-15 18:36:21 +09:00
Yamashita Yuu
d9e3adc108
Performe as same as before v20140614 if pyenv virtualenv-init is not configured ( #26 )
2014-06-15 16:43:50 +09:00
Yamashita Yuu
4a6ef11349
v20140614
2014-06-14 14:45:57 +09:00
Yamashita Yuu
e853f74b26
Fix test cases around create_symlinks
2014-06-12 20:35:46 +09:00
Yamashita Yuu
55a2a9e482
Read shell profile from $TMP during tests
2014-06-05 00:16:41 +09:00
Yamashita Yuu
6761ed09cd
Add test for pyenv-virtualenv-init
2014-06-04 20:48:22 +09:00
Yamashita Yuu
8a837758dc
activate: invoke pyenv shell only if the arguments passed
2014-06-04 15:24:36 +09:00
Yamashita Yuu
af6c157a79
Add eval "$(pyenv virtualenv-init -)" to setup _precmd_ for user's shell
2014-06-04 15:24:12 +09:00
Yamashita Yuu
c9043920db
v20140602
2014-06-02 21:42:27 +09:00
Yamashita Yuu
26f2004abb
Add semicolon for the deactivate scripts for non-fish
2014-06-02 16:02:39 +09:00
Fotis Gimian
21a8745bcf
Updated tests to correctly pass for fish shell bug fix
2014-05-31 15:15:45 +10:00
Yamashita Yuu
579f4784c8
v20140421 ( fixes #19 )
2014-04-21 20:24:25 +09:00