mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-09 12:03:55 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ebc8ff8a | ||
|
|
4c8eeebbff | ||
|
|
433992e376 | ||
|
|
efe6d6757c |
@@ -1,5 +1,9 @@
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
#### 20160112
|
||||||
|
|
||||||
|
* Fix problem with `virtualenv` to look up executables from source version with `--system-site-packages` (#62)
|
||||||
|
|
||||||
#### 20151229
|
#### 20151229
|
||||||
|
|
||||||
* Fix `deactivate` error on `fish` (#136)
|
* Fix `deactivate` error on `fish` (#136)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ From inside that directory you can:
|
|||||||
$ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
|
$ 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
|
```sh
|
||||||
$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
|
$ 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
|
Some external tools (e.g. [jedi](https://github.com/davidhalter/jedi)) might
|
||||||
require you to `activate` the virtualenv and `conda` environments.
|
require you to `activate` the virtualenv and `conda` environments.
|
||||||
|
|
||||||
`pyenv-virtualenv` will automatically activate/deactivate the virtualenv if
|
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.
|
||||||
the `eval "$(pyenv virtualenv-init -)"` is properly configured in your shell.
|
|
||||||
|
|
||||||
You can also activate and deactivate a pyenv virtualenv manually:
|
You can also activate and deactivate a pyenv virtualenv manually:
|
||||||
|
|
||||||
|
|||||||
@@ -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="20151229"
|
PYENV_VIRTUALENV_VERSION="20160112"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|||||||
@@ -37,8 +37,12 @@ if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
|
|||||||
if [ ! -f "${no_global_site_packages}" ]; then
|
if [ ! -f "${no_global_site_packages}" ]; then
|
||||||
include_system_site_packages=1
|
include_system_site_packages=1
|
||||||
fi
|
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
|
fi
|
||||||
|
if [ -n "${include_system_site_packages}" ] && [ -n "${virtualenv_prefix}" ]; then
|
||||||
# virtualenv is created with `--system-site-packages`
|
# virtualenv is created with `--system-site-packages`
|
||||||
virtualenv_command_path="${virtualenv_prefix}/bin/${PYENV_COMMAND_PATH##*/}"
|
virtualenv_command_path="${virtualenv_prefix}/bin/${PYENV_COMMAND_PATH##*/}"
|
||||||
if [ -x "${virtualenv_command_path}" ]; then
|
if [ -x "${virtualenv_command_path}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user