Skip to content

Create virtualenv inside envs directory as similar as Anaconda - #107

Merged
yyuu merged 2 commits into
masterfrom
create-virtualenv-in-envs
Nov 5, 2015
Merged

yyuu merged 2 commits into
masterfrom
create-virtualenv-in-envs

Conversation

@yyuu

@yyuu yyuu commented Nov 4, 2015

Copy link
Copy Markdown
Collaborator

This changes the installation path of virtualenv as similar as Anaconda/Miniconda. This would be reasonable since every virtualenvs are actually depending on its source version, and they cannot work alone.

This is a kind of breaking change. To mitigate the migration cost, I prepared a symlink of COMPAT_VIRTUALENV_PATH for backward compatibility.

Comment thread bin/pyenv-virtualenv Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: create symlink?

👍

Also two symlinks or only env-${VIRTUALENV_NAME} would be nice (regarding the namespace/sorting aspect).

Edit: done below (https://github.com/yyuu/pyenv-virtualenv/pull/107/files#diff-bd69978b5a6129153b41981ec977a3d5R436) already, so the TODO seems obsolete.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The var should be prefixed with PYENV_.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I prefer simple naming of ${VIRTUALENV_NAME} than env-${VIRTUALENV_NAME}. It would be better from the point of view of backward compatibility. I think naming of the virtualenv would be a matter of users, and tool should not do mangling as much as possible....

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMPAT_VIRTUALENV_PATH is a shell variable, not an environment variable. So, we don't have to be severe about naming convention, I believe.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO message was just lying.... I'll remove it.

@blueyed

blueyed commented Nov 5, 2015

Copy link
Copy Markdown
Collaborator

Nice!

yyuu added a commit that referenced this pull request Nov 5, 2015
Create virtualenv inside `envs` directory as similar as Anaconda
@yyuu
yyuu merged commit 5c9909f into master Nov 5, 2015
@yyuu
yyuu deleted the create-virtualenv-in-envs branch November 5, 2015 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants