Josh French
fca12418ca
Add activate/deactivate hooks ( #452 )
2023-03-22 20:39:55 +03:00
Alain Kalker
1ee7ca6346
Fix unbound variable errors when running pyenv activate with set -u ( #423 )
2022-01-29 20:53:52 +03:00
Luis Marsano
e0a1e9b35c
support newer conda
...
pyenv-virtualenvs could not list conda environments & pyenv shell would only activate the base conda environment
the conda detection criteria of testing the presence of `conda` or `activate` files under `$(pyenv root)/versions/$version/bin` appears to be the culprit, since newer environments no longer include these files: those files reside in the base conda environment
- add detection criteria of `$(pyenv root)/versions/$version/conda-meta`
- compute the real prefix to the base environment from `realpath $(realpath $(pyenv root)/versions/$version)/../..`
- to allow that, enhance substitute `realpath` in `pyenv-virtualenvs` to reduce relative paths `.` & `..`, and factor that code out to a file under `libexec` for reuse
- hook `which` to locate conda from the real prefix
2018-11-21 22:00:56 -05:00
Christoph Paulik
f64c8ed0dd
Set CONDA_PREFIX to make is useable in conda activate/deactivate scripts.
2017-07-20 15:53:55 +02:00
Drummond Ogilvie
862be21a32
fish: use "set -gx" instead of "setenv" ( #218 )
...
Use `set -gx` instead of `setenv` for fish shell.
Fix test "activate if the first virtualenv is a virtualenv": it was asserting
the output was of bash form, but not specifying that in the test — it now does.
Fixes https://github.com/pyenv/pyenv-virtualenv/issues/216 .
2017-06-08 21:52:57 +02:00
Yamashita, Yuu
8c7dd01954
Replaced pyvenv by -m venv
2016-07-16 06:50:50 +00:00
Yamashita, Yuu
d6bc583753
Source conda package activate/deactivat scripts if exist ( fixes #173 )
2016-05-24 00:39:40 +00:00
Yamashita, Yuu
1cb6bb06ef
Turn PYENV_VIRTUALENV_VERBOSE_ACTIVATE on if --verbose is given
2016-05-07 13:45:00 +00:00
Yamashita, Yuu
08cfea259c
Remove backward compat --no-error option
2016-05-07 13:40:48 +00:00
Yamashita, Yuu
c64aebef08
1) Made --quiet as opposite of --verbose 2) Suppress warning about prompts on --quiet
2016-05-07 13:40:32 +00:00
puhitaku
f627609419
Suppress activate/deactivate messages by default
2016-04-08 15:45:26 +09:00
Yamashita, Yuu
13b7dc172a
need to use functions -q to check existence of the function in fish ( #136 )
2015-12-29 09:03:31 +00:00
Yamashita, Yuu
17d22e7a13
Add PYENV_VIRTUAL_ENV to check if the virtualenv has been activated via pyenv-virtualenv or not ( #128 )
2015-12-05 01:44:10 +00:00
Yamashita, Yuu
aae3bf2786
Add workaround for rywyo/anyenv
2015-12-04 00:43:03 +00:00
Yamashita, Yuu
e230817496
Restored --no-error for compatibility with v20151103 and earlier
2015-12-02 23:59:41 +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
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
ee18ffac9f
Change prompt after activate ( #52 )
2015-11-09 01:57:17 +00:00
Yamashita, Yuu
950a742be3
Add short options
2015-11-08 09:18:29 +00:00
Yamashita, Yuu
bdd52a79cd
Revert PYENV_DEACTIVATE for backward compatibility
2015-11-08 08:34:43 +00:00
Yamashita, Yuu
f7d1aa7d94
Allow activating first version of virtualenv even if there are multiple versions in pyenv ( #105 )
2015-11-08 06:32:28 +00:00
Yamashita, Yuu
0fa5de07c9
fix broken tests
2015-11-06 18:26:23 +00:00
Yamashita, Yuu
017d20ad91
remove unnecessary logic from init script
2015-11-06 17:58:09 +00:00
Yamashita, Yuu
7f33ddd911
prompt should be managed by users, not by tools
2015-11-06 17:34:21 +00:00
Yamashita, Yuu
8731e9bf14
replaced --no-error by --quiet
2015-11-06 17:33:40 +00:00
Yamashita, Yuu
bf7e9ba59a
Show activating... messages by default
2015-11-06 17:27:50 +00:00
Yamashita, Yuu
c6a705b1d9
Setup CONDA_DEFAULT_ENV only if conda executable exists
2015-11-05 01:49:04 +00:00
Yamashita, Yuu
64ceee5c8e
Stop using virtualenv's activate script ( #69 )
2015-11-04 13:50:17 +00: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
be6701e7b6
Fix Error: too many arguments. on deactivating anaconda env
2015-07-19 01:04:23 +09:00
Yamashita, Yuu
65c74dbf2d
activate/deactivate anaconda/miniconda envs
2015-07-19 00:08:09 +09: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
a3c86f013b
Deactivate virtualenv even if it has been activated manually
2014-07-11 20:24:58 +09:00
Yamashita Yuu
aef2546319
Fix broken fish's if statement
2014-07-05 07:30:53 +09:00
Yamashita Yuu
abfda4bac9
Fix issues with manual activation of virtual environments ( #34 )
2014-07-04 22:55:06 +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
08b4c94f85
Use PYENV_DEACTIVATE to store which virtualenv has been deactivated ( #32 )
2014-06-30 23:03:37 +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
8a837758dc
activate: invoke pyenv shell only if the arguments passed
2014-06-04 15:24:36 +09:00
Yamashita Yuu
26f2004abb
Add semicolon for the deactivate scripts for non-fish
2014-06-02 16:02:39 +09:00
Fotis Gimian
f7da0c5808
Repaired virtualenv activation and deactivation for the fish shell
2014-05-31 12:29:19 +10:00
Yamashita Yuu
f9d3984909
Hide output from declare -f deactivate
2014-01-17 22:39:37 +09:00
Yamashita Yuu
85959c735d
Add sh commands to activate/deactivate virtualenv into current shell
2014-01-17 20:17:15 +09:00