aisbaa
aisbaa

Reputation: 10633

How make buildout add eggs to virtualenv

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:

  1. buildout generates django executable script that contains all required paths. This script gets installed into virtual/bin/.
  2. I've tried gp.recipe.pip, but it doesn't seem to do what I need.
  3. I haven't tried rjm.recipe.venv yet

Solution

Its not perfect, but works:

  1. collect eggs to one folder using collective.recipe.omelette.
  2. add __init__.py file to this folder using cp.recipe.cmd (thanks to sureshvv).
  3. append path to this folder in required python files (in my case its manage.py).

Upvotes: 2

Views: 1071

Answers (1)

sureshvv
sureshvv

Reputation: 4422

You can use cp.recipe.cmd and run the easy_install command with the --install-dir optiion

Upvotes: 1

Related Questions