My problem with virtualenv is solved. Great thanks to Malcolm Tredinnick for taking the time to understand it and pushing me into the right direction.
As I said in the previous post, I didn't really need the isolation feature of virtualenv with my single-user, single-codebase site. What I really needed was pip. But I was ready to live with virtualenv if needed, just wasn't quite happy with the amount of machinery required to make my code see and use it.
Apparently what I was missing was PEP 370. Modern Pythons now have a special place for local user packages. And the good thing is that pip knows how to use it. Which is exactly what I needed.
- I don't use virtualenv to run my site from.
pip install --usereverything non-system into the local site-packages.
- I also symlink all my own local code into the local site-packages.
- I got rid of all the modifications in manage.py and wsgi.py.
All in all, I'm very glad that I had a chance to play and understand virtualenv (and related things like virtualenvwrapper). Coincidentally, it was recently accepted to Python core. Congratulations!