mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-09 03:53:54 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ce2e2d730 | ||
|
|
d3d6504e01 | ||
|
|
15981986e5 | ||
|
|
ddda0d7200 | ||
|
|
4f39ac4623 | ||
|
|
dbbbc33206 |
@@ -1,5 +1,10 @@
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
#### 20160315
|
||||||
|
|
||||||
|
* Evaluate `${PATH}` when outputted code is eval'd. (#154)
|
||||||
|
* Set proper `CONDA_DEFAULT_ENV` for shorter name (#160)
|
||||||
|
|
||||||
#### 20160202
|
#### 20160202
|
||||||
|
|
||||||
* Install virtualenv 13.1.2 for CPython/Stackless 3.2.x (yyuu/pyenv#531)
|
* Install virtualenv 13.1.2 for CPython/Stackless 3.2.x (yyuu/pyenv#531)
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -111,14 +111,18 @@ $ pyenv virtualenv venv34
|
|||||||
`pyenv virtualenvs` shows you the list of existing virtualenvs and `conda` environments.
|
`pyenv virtualenvs` shows you the list of existing virtualenvs and `conda` environments.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ pyenv shell venv27
|
$ pyenv shell venv34
|
||||||
$ pyenv virtualenvs
|
$ pyenv virtualenvs
|
||||||
miniconda3-3.9.1 (created from /home/yyuu/.pyenv/versions/miniconda3-3.9.1)
|
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)
|
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)
|
2.7.10/envs/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)
|
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
|
### Activate virtualenv
|
||||||
|
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ esac
|
|||||||
|
|
||||||
# anaconda/miniconda
|
# anaconda/miniconda
|
||||||
if [ -x "${prefix}/bin/conda" ]; then
|
if [ -x "${prefix}/bin/conda" ]; then
|
||||||
if [[ "${venv}" != "${venv%/envs/*}" ]]; then
|
if [[ "${prefix}" != "${prefix%/envs/*}" ]]; then
|
||||||
CONDA_DEFAULT_ENV="${venv##*/envs/}"
|
CONDA_DEFAULT_ENV="${venv##*/envs/}"
|
||||||
else
|
else
|
||||||
CONDA_DEFAULT_ENV="root"
|
CONDA_DEFAULT_ENV="root"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# -f/--force Install even if the version appears to be installed already
|
# -f/--force Install even if the version appears to be installed already
|
||||||
#
|
#
|
||||||
|
|
||||||
PYENV_VIRTUALENV_VERSION="20160202"
|
PYENV_VIRTUALENV_VERSION="20160315"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ EOS
|
|||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
cat <<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;
|
export PYENV_VIRTUALENV_INIT=1;
|
||||||
EOS
|
EOS
|
||||||
;;
|
;;
|
||||||
|
|||||||
4
test/init.bats
Normal file → Executable file
4
test/init.bats
Normal file → Executable file
@@ -50,7 +50,7 @@ load test_helper
|
|||||||
run pyenv-virtualenv-init - bash
|
run pyenv-virtualenv-init - bash
|
||||||
assert_success
|
assert_success
|
||||||
assert_output <<EOS
|
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;
|
export PYENV_VIRTUALENV_INIT=1;
|
||||||
_pyenv_virtualenv_hook() {
|
_pyenv_virtualenv_hook() {
|
||||||
local ret=\$?
|
local ret=\$?
|
||||||
@@ -91,7 +91,7 @@ EOS
|
|||||||
run pyenv-virtualenv-init - zsh
|
run pyenv-virtualenv-init - zsh
|
||||||
assert_success
|
assert_success
|
||||||
assert_output <<EOS
|
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;
|
export PYENV_VIRTUALENV_INIT=1;
|
||||||
_pyenv_virtualenv_hook() {
|
_pyenv_virtualenv_hook() {
|
||||||
local ret=\$?
|
local ret=\$?
|
||||||
|
|||||||
Reference in New Issue
Block a user