Project

General

Profile

Actions

Hacking Python SDK » History » Revision 7

« Previous | Revision 7/25 (diff) | Next »
Brett Smith, 07/18/2014 10:27 AM
Add required match for python setup.py rotate


Hacking Python SDK

Prerequisites

The FUSE driver requires associated libraries to build:

sudo apt-get install libattr1-dev libfuse-dev pkg-config fuse
sudo adduser "$USER" fuse
sudo chmod g+rw /dev/fuse
sudo chown root:fuse /dev/fuse

After installing fuse and adding yourself to the fuse group, you need to start a new login session. Make sure the groups command reports that you're in the fuse group.

Get the source code

cd
git clone https://github.com/curoverse/arvados.git

virtualenv

virtualenv helps you isolate the dependencies for a specific package or environment, much like Bundler does for our Rails applications. The recommended way to deploy is to build a virtualenv for Arvados development.

To build the virtualenv, run:

$ virtualenv --setuptools VENVDIR

(VENVDIR can be a directory anywhere you like, although best practice is to keep it outside your source directory.)

To set up the shell to use the isolated virtualenv environment, run:

$ source VENVDIR/bin/activate

To learn more about using and configuring virtualenv, read the virtualenv usage documentation.

Run tests

Strategy:
  1. Set up the environment to use a dedicated virtualenv
  2. Run the client library test suite
  3. Build a client library package and install it to the virtualenv
  4. Run the FUSE driver test suite
  5. Build a FUSE driver package and install it to the virtualenv
Note: The test suite brings up a Keep server and an API server to run tests against. For best results:
  • Try Hacking Keep and Hacking API Server to make sure you have all the right dependencies for running the Keep and API servers.
  • Make sure you have a blob_signing_key in services/api/config/application.yml

Script (make sure to edit the first line to refer to your virtualenv):

source VENVDIR/bin/activate

cd ~/arvados/sdk/python
GOPATH="$HOME/gocode" python setup.py test
python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
pip install dist/arvados-python-client-0.1.*.tar.gz

cd ~/arvados/services/fuse
GOPATH="$HOME/gocode" python setup.py test
python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
pip install dist/arvados_fuse-0.1.*.tar.gz

Updated by Brett Smith over 9 years ago · 7 revisions