Building the Python bindings

Versions >= 0.64.4

  • Install 'distribute' (tested with version 0.6.12):
    curl -O http://python-distribute.org/distribute_setup.py
    python distribute_setup.py
    
  • Change into 'python' subdirectory:
    cd YOUR_DRQUEUE_INSTALL_FOLDER/python
    
  • Build Python bindings:
    python setup.py build
    
  • Install build:
    sudo python setup.py install
    

OLD: Versions >= 0.64.2

Just move to the "python" directory and type:

bash# python setup.py install

That should compile and install the package.

*Please read [browser:/tags/0.64.2p1/README.python README.python] to more information on the basic changes in it's structure.

OLD: Versions < 0.64.2

Check the dependecies list first.

If you're running any development version (hourly package or sources from the subversion repository) you should read the last section about versions greater than 0.64.1

Compiling the python bindings is as easy as:

cd /path/to/drqueue/sources
cd python
scons

After that you will have two very important files drqueue.py and _drqueue.so. Those two files are needed to import the drqueue python module.

Once you have those files you can make use of the whole DrQueue library by importing the module in your python script.
You can do that using the following lines in your python script:

import sys
sys.path.insert(0,'/path/to/the/python/bindings')
import drqueue

Check the python bindings howto for more information on their usage.

OLD: Versions > 0.64.1

If you are using code more recent than 0.64.1 you should use the following procedure.

# cd /path/to/drqueue/sources
# cd python
# python setup.py build_ext
# python setup.py install

That will install the python module in your system's default python library path. So scripts won't need the line "sys.path.insert ..." anymore.