6 Commits

Author SHA1 Message Date
Yamashita, Yuu
1ce2e2d730 v20160315 2016-03-15 00:37:46 +00:00
Yamashita, Yuu
d3d6504e01 Set proper CONDA_DEFAULT_ENV for shorter name (#160) 2016-03-14 12:50:27 +00:00
Yamashita, Yuu
15981986e5 Merge pull request #154 from seanfisk/eval-path-later
Evaluate ${PATH} when outputted code is eval'd.
2016-03-07 11:40:54 +09:00
Yamashita, Yuu
ddda0d7200 Merge pull request #158 from marco-buttu/master
`pyenv virtualenvs` lists two entries for each virtualenv
2016-03-05 21:55:47 +09:00
Marco Buttu
4f39ac4623 "pyenv virtualenvs" lists two entries for each virtualenv 2016-03-05 08:50:10 +01:00
Sean Fisk
dbbbc33206 Evaluate ${PATH} when outputted code is eval'd.
It was previously evaluated when 'pyenv virtualenv-init' is run.
2016-03-01 01:12:06 -05:00
6 changed files with 17 additions and 8 deletions

View File

@@ -1,5 +1,10 @@
## Version History
#### 20160315
* Evaluate `${PATH}` when outputted code is eval'd. (#154)
* Set proper `CONDA_DEFAULT_ENV` for shorter name (#160)
#### 20160202
* Install virtualenv 13.1.2 for CPython/Stackless 3.2.x (yyuu/pyenv#531)

View File

@@ -111,14 +111,18 @@ $ pyenv virtualenv venv34
`pyenv virtualenvs` shows you the list of existing virtualenvs and `conda` environments.
```sh
$ pyenv shell venv27
$ pyenv shell venv34
$ pyenv virtualenvs
miniconda3-3.9.1 (created from /home/yyuu/.pyenv/versions/miniconda3-3.9.1)
miniconda3-3.9.1/envs/myenv (created from /home/yyuu/.pyenv/versions/miniconda3-3.9.1)
* venv27 (created from /home/yyuu/.pyenv/versions/2.7.10)
venv34 (created from /home/yyuu/.pyenv/versions/3.4.3)
2.7.10/envs/my-virtual-env-2.7.10 (created from /home/yyuu/.pyenv/versions/2.7.10)
3.4.3/envs/venv34 (created from /home/yyuu/.pyenv/versions/3.4.3)
my-virtual-env-2.7.10 (created from /home/yyuu/.pyenv/versions/2.7.10)
* venv34 (created from /home/yyuu/.pyenv/versions/3.4.3)
```
There are two entries for each virtualenv, and the shorter one is just a symlink.
### Activate virtualenv

View File

@@ -180,7 +180,7 @@ esac
# anaconda/miniconda
if [ -x "${prefix}/bin/conda" ]; then
if [[ "${venv}" != "${venv%/envs/*}" ]]; then
if [[ "${prefix}" != "${prefix%/envs/*}" ]]; then
CONDA_DEFAULT_ENV="${venv##*/envs/}"
else
CONDA_DEFAULT_ENV="root"

View File

@@ -9,7 +9,7 @@
# -f/--force Install even if the version appears to be installed already
#
PYENV_VIRTUALENV_VERSION="20160202"
PYENV_VIRTUALENV_VERSION="20160315"
set -e
[ -n "$PYENV_DEBUG" ] && set -x

View File

@@ -92,7 +92,7 @@ EOS
;;
* )
cat <<EOS
export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:${PATH}";
export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
EOS
;;

4
test/init.bats Normal file → Executable file
View File

@@ -50,7 +50,7 @@ load test_helper
run pyenv-virtualenv-init - bash
assert_success
assert_output <<EOS
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:${PATH}";
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
_pyenv_virtualenv_hook() {
local ret=\$?
@@ -91,7 +91,7 @@ EOS
run pyenv-virtualenv-init - zsh
assert_success
assert_output <<EOS
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:${PATH}";
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
_pyenv_virtualenv_hook() {
local ret=\$?