mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-08 11:33:55 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ebc8ff8a | ||
|
|
4c8eeebbff | ||
|
|
433992e376 | ||
|
|
efe6d6757c | ||
|
|
5963688fc4 | ||
|
|
13b7dc172a |
@@ -1,5 +1,13 @@
|
||||
## Version History
|
||||
|
||||
#### 20160112
|
||||
|
||||
* Fix problem with `virtualenv` to look up executables from source version with `--system-site-packages` (#62)
|
||||
|
||||
#### 20151229
|
||||
|
||||
* Fix `deactivate` error on `fish` (#136)
|
||||
|
||||
#### 20151222
|
||||
|
||||
* Improved interoperability with Anaconda/Miniconda (#103, #106, #107, #108)
|
||||
|
||||
@@ -34,7 +34,7 @@ From inside that directory you can:
|
||||
$ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
|
||||
```
|
||||
|
||||
2. (OPTIONAL) **Add `pyenv virtualenv-init` to your shell** to enable auto-activation of virtualenv. This is entirely optional but pretty useful.
|
||||
2. (OPTIONAL) **Add `pyenv virtualenv-init` to your shell** to enable auto-activation of virtualenvs. This is entirely optional but pretty useful. See "Activate virtualenv" below.
|
||||
|
||||
```sh
|
||||
$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
|
||||
@@ -125,8 +125,7 @@ $ pyenv virtualenvs
|
||||
Some external tools (e.g. [jedi](https://github.com/davidhalter/jedi)) might
|
||||
require you to `activate` the virtualenv and `conda` environments.
|
||||
|
||||
`pyenv-virtualenv` will automatically activate/deactivate the virtualenv if
|
||||
the `eval "$(pyenv virtualenv-init -)"` is properly configured in your shell.
|
||||
If `eval "$(pyenv virtualenv-init -)"` is configured in your shell, `pyenv-virtualenv` will automatically activate/deactivate virtualenvs on entering/leaving directories which contain a `.python-version` file that lists a valid virtual environment. `.python-version` files denote local Python versions and can be created and deleted with the [`pyenv local`](https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local) command.
|
||||
|
||||
You can also activate and deactivate a pyenv virtualenv manually:
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ esac
|
||||
case "${shell}" in
|
||||
fish )
|
||||
cat <<EOS
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# -f/--force Install even if the version appears to be installed already
|
||||
#
|
||||
|
||||
PYENV_VIRTUALENV_VERSION="20151222"
|
||||
PYENV_VIRTUALENV_VERSION="20160112"
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -37,8 +37,12 @@ if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
|
||||
if [ ! -f "${no_global_site_packages}" ]; then
|
||||
include_system_site_packages=1
|
||||
fi
|
||||
virtualenv_orig_prefix="$(find "${virtualenv_libpath}/" -maxdepth 2 -type f -and -name "orig-prefix.txt" 2>/dev/null | head -1)"
|
||||
if [ -f "${virtualenv_orig_prefix}" ]; then
|
||||
virtualenv_prefix="$(cat "${virtualenv_orig_prefix}" 2>/dev/null || true)"
|
||||
fi
|
||||
fi
|
||||
if [ -n "${include_system_site_packages}" ]; then
|
||||
if [ -n "${include_system_site_packages}" ] && [ -n "${virtualenv_prefix}" ]; then
|
||||
# virtualenv is created with `--system-site-packages`
|
||||
virtualenv_command_path="${virtualenv_prefix}/bin/${PYENV_COMMAND_PATH##*/}"
|
||||
if [ -x "${virtualenv_command_path}" ]; then
|
||||
|
||||
@@ -77,7 +77,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
|
||||
@@ -228,7 +228,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
@@ -255,7 +255,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
@@ -284,7 +284,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
@@ -313,7 +313,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
@@ -340,7 +340,7 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
if functions -g deactivate;
|
||||
if functions -q deactivate;
|
||||
functions -e deactivate;
|
||||
end;
|
||||
EOS
|
||||
|
||||
Reference in New Issue
Block a user