Merge lp:~soren/riakalchemy/virtualenv into lp:riakalchemy

Proposed by Soren Hansen
Status: Merged
Approved by: Soren Hansen
Approved revision: 24
Merged at revision: 24
Proposed branch: lp:~soren/riakalchemy/virtualenv
Merge into: lp:riakalchemy
Diff against target: 66 lines (+37/-0)
4 files modified
README.md (+19/-0)
tools/pip-requirements.txt (+5/-0)
tools/setup_virtualenv.sh (+8/-0)
tools/venv_wrap.sh (+5/-0)
To merge this branch: bzr merge lp:~soren/riakalchemy/virtualenv
Reviewer Review Type Date Requested Status
Soren Hansen Pending
Review via email: mp+85615@code.launchpad.net

Commit message

Provide a pip-requirements file and tools to easily create a virtualenv

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2011-12-08 16:06:06 +0000
3+++ README.md 2011-12-14 09:13:46 +0000
4@@ -216,9 +216,28 @@
5
6 > {delete_mode, immediate}
7
8+### Scripted configuration ###
9+
10+You can make all these config changes with this single command assuming
11+your existing `app.config` is unmodified from when you installed Riak.
12+
13+> sudo sed -e '/^ {riak_kv/ a {delete_mode, immediate},' \
14+> -e 's/storage_backend, riak_kv_bitcask_backend/storage_backend, riak_kv_eleveldb_backend/' \
15+> -e '/^ {riak_search/,+2 s/enabled, false/enabled, true/' -i.bak /etc/riak/app.config
16+
17 ## Running the tests ##
18
19 At the moment, python-riak's TestServer doesn't support 2I, so we need
20 access to a real Riak. To run the tests against a real Riak, use:
21
22 > $ RIAKALCHEMY_SYSTEM_RIAK_PORT=8098 nosetests .
23+
24+### Virtualenv ###
25+
26+The `tools/` directory has a script to easily create a virtualenv for you:
27+
28+> $ tools/setup_virtualenv.sh
29+
30+Once it's done, you can run the unit tests in the virtualenv like so:
31+
32+> $ RIAKALCHEMY_SYSTEM_RIAK_PORT=8098 .tools/venv_wrap.sh nosetests
33
34=== added directory 'tools'
35=== added file 'tools/pip-requirements.txt'
36--- tools/pip-requirements.txt 1970-01-01 00:00:00 +0000
37+++ tools/pip-requirements.txt 2011-12-14 09:13:46 +0000
38@@ -0,0 +1,5 @@
39+-e git://github.com/basho/riak-python-client.git@master#egg=riak
40+nose
41+yanc
42+nosexcover
43+unittest2
44
45=== added file 'tools/setup_virtualenv.sh'
46--- tools/setup_virtualenv.sh 1970-01-01 00:00:00 +0000
47+++ tools/setup_virtualenv.sh 2011-12-14 09:13:46 +0000
48@@ -0,0 +1,8 @@
49+#!/bin/bash
50+
51+topdir=$(dirname $0)/../
52+cd $topdir
53+
54+rm -rf .venv
55+virtualenv --no-site-packages .venv
56+.venv/bin/pip install -r tools/pip-requirements.txt
57
58=== added file 'tools/venv_wrap.sh'
59--- tools/venv_wrap.sh 1970-01-01 00:00:00 +0000
60+++ tools/venv_wrap.sh 2011-12-14 09:13:46 +0000
61@@ -0,0 +1,5 @@
62+#!/bin/bash
63+topdir=$(dirname $0)/..
64+cd $topdir
65+source .venv/bin/activate
66+exec "$@"

Subscribers

People subscribed via source and target branches

to all changes: