On Tue, May 12, 2009 at 06:40:24PM +0200, Antonio Beamud Montero wrote:
> How do you name virtual environments?
> And where do you store this enviroments?
> Exists any recipe to manage several virtual envs and not die trying it? :)

All projects I'm working on are in

  ~/src/projectname             (checked out directly from version control)
  ~/src/projectname-branchname  (if I'm not working on several branches)
  ~/src/company/projectname     (if I'm consulting for a company that
                                 has several projects)

The directory contains both the source code (under version control) and
the working environment (not under version control, for obvious
reasons).  Some of the projects use zc.buildout, which means starting
to work on a project is

  svn co ... projectname
  cd projectname
  python bootstrap.py
  bin/buildout
  bin/test
  etc.

This probably influenced the way I use virtualenv:

  bzr get ... projectname # or whatever VCS
  cd projectname
  virtualenv sandbox
  sandbox/bin/python setup.py develop

I tend to create a 'bin/' subdirectory with scripts (bin/test
especially, bin/run, bin/python and bin/ctags usually) if one doesn't
exist already.  I haven't got a naming scheme for virtualenvs since I
rarely use them directly (easy_installing dependencies is a rare thing,
and I create wrappers/symlinks in $projectname/bin for all other tasks),
and I never have more than one virtualenv per project.

I dislike state in my shell environment and thus I never ever use
virtualenv's activate scripts.  The project I currently work on is
defined by my current working directory.  I tend to spawn new terminals
frequently, and GNOME Terminal conveniently starts the new tab or window
in the right working directory.

This seems to work quite well for me.

Marius Gedminas
-- 
The death rate on Earth is: .... (computing) .... One per person.

Attachment: signature.asc
Description: Digital signature

Reply via email to