I have to work with few django projects that uses virtualenv (and that is fine). Except its quite hard to get this virtual setup every time I want to develop something.
So I’d like to use zc.buildout, it would solve easy environment construction issue. Unfortunately I must not break old virtualenv way of developing/deploying.
Projects heavily rely on manage.py file.
/project_root
|-- virtual
|-- website
|-- manage.py (has to access all python packages that buildout installs)
`-- ...
Basically I need buildout to install eggs to virtual/lib/python/site_packages folder, best would be to symlink form egg cache.
Notes:
- buildout generates django executable script that contains all required paths. This script gets installed into virtual/bin/.
- I’ve tried gp.recipe.pip, but it doesn’t seem to do what I need.
- I haven’t tried rjm.recipe.venv yet
Solution
Its not perfect, but works:
- collect eggs to one folder using collective.recipe.omelette.
- add __init__.py file to this folder using cp.recipe.cmd (thanks to sureshvv).
- append path to this folder in required python files (in my case its manage.py).
You can use cp.recipe.cmd and run the easy_install command with the –install-dir optiion