InstallationPython » History » Version 4

« Previous - Version 4/16 (diff) - Next » - Current version
J. Wienke, 09/01/2011 05:54 PM


Installation of Python Implementation

External Dependencies

  • install python setuptools and python-dev
  • spread-python (e.g. via GAR installer, sources can be downloaded here: http://www.spread.org/files/SpreadModule-1.5spread4.tgz, the version automatically installed by setuptools is NOT working!)
  • python-protobuf (via ubuntu package python-protobuf or protobuf sources)

Installation

  1. Install RSBProtocol as described here
  2. get sources
  3. create and edit setup.cfg
    • in contrast to cmake or partially ant, setuptools does not use command line arguments to configure projects. Instead a file called setup.cfg in the project root is used: http://docs.python.org/distutils/configfile.html
    • especially, replace protocolroot in section [proto] with the path to the RSBPRobotocol files (e.g. protocolroot=${prefix}/share/RSBProtocol)
    • other available options (besides standard ones from python):
      • protoc in section [proto]: The protoc compiler used to generate the protocol. If not specified PATH is used.
      • format in section [doc]: either "html" or "pdf" for the API documentation generation
      • verbose in section [doc]: bool flag to control verbose output of the generation tool epydoc
      • spread in sections [coverage] and [test]: path to the spread executable used for coverage generation and unit testing. PATH is used if not specified
    • An exemplary setup.cfg file could look like this:
      [proto]
      protocolroot=/your/prefix/share/RSBProtocol
      [test]
      spread=/your/prefix/sbin/spread
      [coverage]
      spread=/your/prefix/sbin/spread
      
  4. start building and installation
    export PYTHONPATH=$prefix/lib/python2.X/site-packages
    python setup.py build
    python setup.py install --prefix=$prefix
    

Afterwards, import rsb should be possible in a python shell.