Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualenvwrapper stopped working #1413

Closed
diraol opened this issue Aug 3, 2017 · 4 comments
Closed

virtualenvwrapper stopped working #1413

diraol opened this issue Aug 3, 2017 · 4 comments

Comments

@diraol
Copy link
Contributor

diraol commented Aug 3, 2017

Description

Until last week (aprox.) my virtualenvwrapper module was working just fine, zpresto was sourcing it without any problems. But, I've made an update yesterday that made it stop working. As far as I could understand, it is not being sourced/loaded, despite virtualenv being available (this is the pre-requisite).
If I can provide any other information I'm fully available to do it, and I would appreciate any help in order to debug this problem. =)
Thanks in advance!

Expected behavior

Have the (python) virtualenvwrapper utilities available on the shell.

Actual behavior

Virtualenvwrapper was not sourced on shell load, thus its aliases and utilities are not available at the shell.

Versions

  • Prezto commit
  • ZSH version
    • zsh 5.3.1 (x86_64-debian-linux-gnu)
  • OS information
  • Python
$ which python
$HOME/.pyenv/shims/python

$ python --version
Python 2.7.13

$ which pip
$HOME/.pyenv/shims/pip

$ pip --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)

$ pip freeze | grep virtual
virtualenv==15.1.0
virtualenv-clone==0.2.6
virtualenvwrapper==4.7.2

$ which virtualenv
/usr/local/bin/virtualenv

$ which virtualenvwrapper
virtualenvwrapper not found

$ which workon
workon not found

$ locate virtualenvwrapper.sh
$HOME/.local/bin/virtualenvwrapper.sh
$HOME/.virtualenvs/kytos/bin/virtualenvwrapper.sh
$HOME/.virtualenvs/kytos_integration_tests/bin/virtualenvwrapper.sh
$HOME/.virtualenvs/kytos_refenv/bin/virtualenvwrapper.sh
$HOME/.virtualenvs/napps_server/bin/virtualenvwrapper.sh
/usr/local/bin/virtualenvwrapper.sh

$ which virtualenvwrapper.sh
/usr/local/bin/virtualenvwrapper.sh

And my runcoms mods:
zshenv:

+
+export WORKON_HOME=$HOME/.virtualenvs
+export PROJECT_HOME="$HOME/devel"
+export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
+export PATH="$HOME/tools/bin:$PATH"

zprofile:

+export PATH="$HOME/.rbenv/bin:$PATH"

zprestorc

diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc
index 0b7a837..e14fe41 100644
--- a/runcoms/zpreztorc
+++ b/runcoms/zpreztorc
@@ -32,6 +32,11 @@ zstyle ':prezto:load' pmodule \
   'spectrum' \
   'utility' \
   'completion' \
+  'python' \
+  'git' \
+  'syntax-highlighting' \
+  'history-substring-search' \
+  'autosuggestions' \
   'prompt'
 
 #
@@ -40,6 +45,7 @@ zstyle ':prezto:load' pmodule \
 
 # Set the query found color.
 # zstyle ':prezto:module:autosuggestions:color' found ''
+zstyle ':prezto:module:autosuggestions' color 'yes'
 
 #
 # Completions
@@ -81,10 +87,10 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
 #
 
 # Set the query found color.
-# zstyle ':prezto:module:history-substring-search:color' found ''
+zstyle ':prezto:module:history-substring-search:color' found ''
 
 # Set the query not found color.
-# zstyle ':prezto:module:history-substring-search:color' not-found ''
+zstyle ':prezto:module:history-substring-search:color' not-found ''
 
 # Set the search globbing flags.
 # zstyle ':prezto:module:history-substring-search' globbing-flags ''
@@ -110,7 +116,8 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
 # Set the prompt theme to load.
 # Setting it to 'random' loads a random theme.
 # Auto set to 'off' on dumb terminals.
-zstyle ':prezto:module:prompt' theme 'sorin'
+POWERLEVEL9K_MODE='awesome-fontconfig'
+zstyle ':prezto:module:prompt' theme 'powerlevel9k'
 
 # Set the working directory prompt display length.
 # By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
@@ -129,7 +136,7 @@ zstyle ':prezto:module:prompt' theme 'sorin'
 #
 
 # Auto switch the Python virtualenv on directory change.
-# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
+zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
 
 # Automatically initialize virtualenvwrapper if pre-requisites are met.
 # zstyle ':prezto:module:python:virtualenv' initialize 'yes'
@@ -172,8 +179,8 @@ zstyle ':prezto:module:prompt' theme 'sorin'
 #   'function' 'bg=blue'
 #
 # Set syntax pattern styles.
-# zstyle ':prezto:module:syntax-highlighting' pattern \
-#   'rm*-rf*' 'fg=white,bold,bg=red'
+zstyle ':prezto:module:syntax-highlighting' pattern \
+  'rm*-rf*' 'fg=white,bold,bg=red'
@indrajitr
Copy link
Collaborator

#1403 is a possible suspect.

Would be really helpful if you can investigate this section and validate whether you are seeing call flow into the corresponding if blocks.

@diraol
Copy link
Contributor Author

diraol commented Aug 4, 2017

Thanks for the tip @indrajitr .
I dig a little bit that section, and the problem seems to be that I do have pyenv, but not the pyenv-virtualenv neither the pyenv-virtualenvwrapper. Then that section code does not try to source the 'virtualenvwrapper.sh' file.

I thought on how to improve that section, but couldn't find an easy and elegant solution (that does not involve just reverting the changes on the section).

@indrajitr
Copy link
Collaborator

@diraol, can you please review #1414 and comment?

diraol pushed a commit to diraol/prezto that referenced this issue Aug 4, 2017
Currently if one have pyenv but not pyenv-virtualenv the
virtualenvwrapper is never loaded. If no pyenv-virtualenvwrapper is
present, then try to load the default python virtualenvwrapper tool.

Fix sorin-ionescu#1413
@diraol
Copy link
Contributor Author

diraol commented Aug 4, 2017

Thanks @indrajitr , I've just commented over there. =)

jeffwidman added a commit that referenced this issue Oct 26, 2022
The desired logic is:

If `virtualenv-init` plugin for `pyenv` present, activate it
If `virtualenvwrapper` plugin for `pyenv` present, activate it
If neither plugin is present, then fallback to normal virtualenvwrapper.

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which solved for when
the `pyenv` `virtualenvwrapper` plugin was present but not the
`virtualenv-init` plugin.

Since the presence of either plugin indicates we should skip the
fallback, this switches to using a flag variable if either plugin is
found.

Additionaly, as an optimization, the check for the `pyenv` plugins are
skipped if `pyenv` itself isn't found.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

If `virtualenv-init` plugin for `pyenv` present, activate it
If `virtualenvwrapper` plugin for `pyenv` present, activate it
If neither plugin is present, then fallback to normal virtualenvwrapper.

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which solved for when
the `pyenv` `virtualenvwrapper` plugin was present but not the
`virtualenv-init` plugin.

Since the presence of either plugin indicates we should skip the
fallback, this switches to using a flag variable if either plugin is
found.

Additionaly, as an optimization, the check for the `pyenv` plugins are
skipped if `pyenv` itself isn't found.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`;
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`;
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.

Fix #2022
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.

Fix #2022
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.

Fix #2022
jeffwidman added a commit that referenced this issue Oct 26, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.

Fix #2022
jeffwidman added a commit that referenced this issue Oct 27, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* #1413
* #1414
* #1433
* #1434

So we need to be extremely careful to continue to support all these
permutations.

Fix #2022
johnoshea pushed a commit to johnoshea/prezto that referenced this issue Oct 29, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
dokai pushed a commit to dokai/prezto that referenced this issue Nov 29, 2022
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
MohamedBassem pushed a commit to MohamedBassem/prezto that referenced this issue Mar 11, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
get-state pushed a commit to get-state/prezto that referenced this issue Apr 2, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
MattHodge pushed a commit to MattHodge/prezto that referenced this issue Jun 17, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
dandrzejewski pushed a commit to dandrzejewski/prezto that referenced this issue Aug 23, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
tjmcs pushed a commit to tjmcs/prezto that referenced this issue Sep 1, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
glebec pushed a commit to glebec/prezto that referenced this issue Oct 8, 2023
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
danyi-david pushed a commit to danyi-david/prezto that referenced this issue May 23, 2024
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
tjmcs pushed a commit to tjmcs/prezto that referenced this issue Jun 12, 2024
…or `virtualenvwrapper` plugins

The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](sorin-ionescu#1414 (comment)).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](sorin-ionescu#1981 (comment)).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
sorin-ionescu#1981 which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* sorin-ionescu#1413
* sorin-ionescu#1414
* sorin-ionescu#1433
* sorin-ionescu#1434

So we need to be extremely careful to continue to support all these
permutations.

Fix sorin-ionescu#2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants