InstallationPython » History » Version 14

Version 13 (J. Wienke, 10/19/2011 11:43 AM) → Version 14/16 (J. Moringen, 12/12/2011 11:49 AM)

h1. Installation of Python Implementation

{{>toc}}

h2. External Dependencies

h3. Spread

Version 4 or better of the "Spread group communication framework":www.spread.org.

h3.
Basics

* install python-setuptools (macports: py27-distribute) and python-dev
* install python-protobuf (via ubuntu package python-protobuf or protobuf sources)

h3. Spread Python

* sources spread-python (sources can be downloaded here: http://www.spread.org/files/SpreadModule-1.5spread4.tgz
*The
http://www.spread.org/files/SpreadModule-1.5spread4.tgz, *the version automatically installed by setuptools is NOT working!*
working!*)

* extract the downloaded archive file and change to the @SpreadModule-1.5spread4@ directory
* edit setup.py and set @SPREAD_DIR@ to your installation prefix (e.g., /usr or /your/prefix)
* build step
<pre>
python setup.py build_ext --rpath $(prefix)/lib
</pre>
* install step
<pre>
python setup.py install --prefix=$(prefix)
</pre>

h2. Installation

# Install RSBProtocol as described [[InstallationC++|here]]
# get sources - https://code.cor-lab.org/svn/rsb/trunk/python/core
# 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:
<pre>
[proto]
protocolroot=/your/prefix/share/RSBProtocol
[test]
spread=/your/prefix/sbin/spread
[coverage]
spread=/your/prefix/sbin/spread
</pre>
# start building and installation
<pre>
export PYTHONPATH=$prefix/lib/python2.X/site-packages # if you are install to /usr or /usr/local it must be dist-packages
python setup.py build
python setup.py install --prefix=$prefix
</pre>

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