Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

tie virtualenvs to mercurial repositorys

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 veh
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .hgignore
Octocat-spinner-32 .hgtags
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 COPYING
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.creole
Octocat-spinner-32 setup.py
README.creole

veh - tie virtualenvs to mercurial repos

This is a virtualenv dependancy system for mercurial repository.

Store a config file with a list of python dependancies in the repository and then use veh to run a shell with the appropriate venv, etc..

Commands you can use

Installing a veh for the repo:

veh [-R repository-dir] install

puts the venv config file in the repository.

Using -R repository-dir let's you specify a directory, otherwise it's the directory you're in (which must be a mercurial repository).

Editing the config file:

veh [-R repositorydir] edit

starts your VISUAL or EDITOR on the veh config file. Editing operates on a copy of the file.

Running a shell session:

veh [-R repositorydir] shell

starts an interactive subshell with the virtualenv activated.

Alternately you can pass a command to run:

veh [-R repositorydir] shell -- start_server

the start_server command is run inside the virtualenv as if by:

bash -c 'start_server'

When the command exits, the virtualenv shell will be destroyed.

Clearing the virtualenv:

veh [-R repositorydir] clear

just does an rm -rf on the virtualenv.

Rebuilding also clears but immediately rebuilds:

veh [-R repositorydir] rebuild

Refresh just tries to re-get each package, without the initial trashing of the virtualenv:

veh [-R repositorydir] refresh

This is useful for adding packages.

You can also list the packages that are declred in the config file:

veh [-R repositorydir] lspackages

Limitations

veh is limited to bash as a shell right now. This is because veh needs to write a shell startup file which pulls in the user's startup and the virtualenv startup and the only shell for which I've coded this support is bash.

I'm pretty sure other shells could be added or some other mechanism for starting the virtualenv in a spawned subshell found.

Something went wrong with that request. Please try again.