with virtualenvwrapper, I could setup separate virtualenvs and calling workon venv have them link to specific settings files (ex. test_settings.py or dev_settings.py) I preset using hooks in the virtualenv's bin - preactivate, postactivate, predeactivate and postdeactivate.
Is there something equivalent for pyenv? pyenv-virtualenv automatically switches virtualenvs based on .python-version set in the current directory, so there's no need to activate and the .pyenv/versions/venv/bin/ dir doesn't have the compliment of hooks that virtualwrapper has anyway.
I can easily create different virtualenvs for my various app environments but how can I link them to different environment-specific app settings?
I ended up adding environment variable export something='something-else'
commands to the activate file ~/.pyenv/versions/my_venv/bin/activate
in the spirit of autoenv after reading this forum reply elsewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With