bmhatfield/riemann-sumd — pull request #4 by goblin (2013-04-25 14:28:01+00:00)
Title: Make it installable in a virtualenv

OK, these are the changes that I needed to make sumd installable with pip into a virtualenv.

I'm not 100% happy with them, but I'm not very proficient with python or its packaging systems.

For starters, I've removed the hardcoded prefix of `/opt/sumd`. I'd prefer to leave a "default prefix" so that it defaults to `/opt/sumd` if not specified but it remains possible to override it. It looks like the way it was done, `setup.cfg` would override anything given in a commandline...

Another problem is that currently all the files from `lib/` (`task.py`, `loader.py`, `scheduler.py` etc) get installed directly into `ve/lib/python2.7/site-packages` rather than for instance `ve/lib/python2.7/site-packages/riemann_sumd`. It makes it messy and possibly conflicting, but I'm not exactly sure how to fix it.

However it seems to work good enough for me as I can now install sumd into a virtualenv. Here are the steps that will make it work:

```
% curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz
% tar zxf virtualenv-1.9.1.tar.gz
% cd virtualenv-1.9.1
% python virtualenv.py ../ve
New python executable in ../ve/bin/python
Installing setuptools............done.
Installing pip...............done.
% cd ../ve
% ./bin/pip install git+git://github.com/digital-science/riemann-sumd.git@add_requirements#egg=riemann-sumd
Downloading/unpacking riemann-sumd from git+git://github.com/digital-science/riemann-sumd.git@add_requirements

(...cut...)

% ./bin/sumd --help
Usage: sumd [options]

(...cut)
```