Skip to content

activate/deactivate script hooks? #55

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

Closed
tiliv opened this issue Nov 24, 2014 · 2 comments
Closed

activate/deactivate script hooks? #55

tiliv opened this issue Nov 24, 2014 · 2 comments

Comments

@tiliv
Copy link

tiliv commented Nov 24, 2014

I wanted to just confirm that there isn't any automatic facility in pyenv or pyenv-virtualenv for hooks like the way virtualenvwrapper provides postactivate and postdeactivate scripts. I'm mostly interested in the setting of environment variables when a version activates.

I'm fine with leaving virtualenvwrapper behind (or else I'd play with pyenv-virtualenvwrapper), but I figured I should find out for sure if there is any similar functionality available to me. I didn't see anything along these lines on https://github.com/yyuu/pyenv/wiki/Plugins

Thanks in advance for any info one way or the other!

@yyuu
Copy link
Collaborator

yyuu commented Nov 29, 2014

At least for now, there is no hook mechanism on version changing in pyenv. It is relatively difficult to hook every version changes in pyenv since it determines the python version on execution time.

If you need such feature, I would recommend you to keep using virtualenvwrapper. Or, I can also recommend you to use other tools such like direnv to setup environment variables.

@tiliv
Copy link
Author

tiliv commented Nov 30, 2014

Thanks for the recommendation. I'll give direnv a shot. Worst case, I'll just end sourceing a file when I want it loaded :P

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