~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to python/python-workqueue/README.rst

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
python-workqueue - README
 
2
=========================
 
3
 
 
4
Overview
 
5
--------
 
6
 
 
7
This is a set of Python bindings for the `WorkQueue`_ Master/Worker Framework.
 
8
 
 
9
Dependencies
 
10
------------
 
11
 
 
12
Required:
 
13
    - `Python <http://www.python.org>`_ (2.6, 2.7)
 
14
    - `CCTools <http://cse.nd.edu/~ccl/software/download.shtml>`_ 
 
15
 
 
16
Although other versions of Python may work, python-workqueue has only been
 
17
tested with Python 2.4 and 2.6.
 
18
 
 
19
Installation
 
20
------------
 
21
 
 
22
Configure your local environment using ``configure.py``::
 
23
 
 
24
    $ ./configure.py -i <path_to_includes> -l <path_to_libs>
 
25
 
 
26
For example if you are on AFS, you can point the script to the public CCTools
 
27
installation::
 
28
    
 
29
    $ ./configure.py -i /afs/nd.edu/user37/ccl/software/cctools/include \
 
30
                     -l /afs/nd.edu/user37/ccl/software/cctools/lib
 
31
 
 
32
To build the Python module, use the ``build_ext`` command with the ``setup.py``
 
33
script::
 
34
 
 
35
    $ ./setup.py build_ext --inplace
 
36
 
 
37
To enable some debugging, build the module as so::
 
38
 
 
39
    $ ./setup.py build_ext --inplace --debug --undef NDEBUG
 
40
 
 
41
To install the Python module, use ``install`` command with the ``setup.py``
 
42
script::
 
43
 
 
44
    $ ./setup.py install --prefix <dest_dir>
 
45
 
 
46
Usage
 
47
-----
 
48
 
 
49
Please see the ``workqueue_example.py`` for an example of how to use the
 
50
library.  For the most part there is a 1-to-1 correspondence between the C
 
51
WorkQueue functions and the Python methods.
 
52
 
 
53
Execute the example as follows::
 
54
 
 
55
    $ python workqueue_example.py
 
56
 
 
57
Remember to start a worker.
 
58
 
 
59
.. _`WorkQueue`: http://www.cse.nd.edu/~ccl/software/workqueue