Project

General

Profile

Hacking Python SDK » History » Version 1

Tom Clegg, 07/03/2014 10:52 AM

1 1 Tom Clegg
h1. Hacking Python SDK
2
3
{{toc}}
4
5
h2. Prerequisites
6
7
<pre>
8
sudo apt-get remove python-yaml
9
sudo apt-get install python python-pip python-dev python-virtualenv libyaml-dev
10
</pre>
11
12
h2. Get the source code
13
14
<pre>
15
cd
16
git clone https://github.com/curoverse/arvados.git
17
</pre>
18
19
h2. Run tests
20
21
Strategy:
22
# Install your local (possibly modified) client library to a virtualenv
23
# Run the client library test suite
24
# Install your local (possibly modified) FUSE driver to the same virtualenv
25
# Run the FUSE driver test suite
26
27
Note: The test suite brings up a Keep server and an API server to run tests against. If this doesn't work, try [[Hacking Keep]] and [[Hacking API Server]] to make sure you have all the right dependencies for running the Keep and API servers.
28
29
Script:
30
31
<pre>
32
VENVDIR=$(mktemp -d)
33
virtualenv --setuptools --system-site-packages "$VENVDIR"
34
35
cd ~/arvados/sdk/python
36
"$VENVDIR/bin/pip" install -e .
37
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
38
39
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
40
"$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz
41
42
cd ~/arvados/services/fuse
43
"$VENVDIR/bin/pip" install -e .
44
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
45
46
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
47
"$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
48
</pre>