InstallationPython » History » Version 6
Anonymous, 10/11/2011 10:14 AM
1 | 1 | S. Wrede | h1. Installation of Python Implementation |
---|---|---|---|
2 | 1 | S. Wrede | |
3 | 1 | S. Wrede | h2. External Dependencies |
4 | 1 | S. Wrede | |
5 | 5 | Anonymous | * install python-setuptools and python-dev |
6 | 3 | J. Wienke | * 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!*) |
7 | 1 | S. Wrede | * python-protobuf (via ubuntu package python-protobuf or protobuf sources) |
8 | 1 | S. Wrede | |
9 | 1 | S. Wrede | h2. Installation |
10 | 1 | S. Wrede | |
11 | 4 | J. Wienke | # Install RSBProtocol as described [[InstallationC++|here]] |
12 | 6 | Anonymous | # get sources - https://code.cor-lab.org/svn/rsb/trunk/python/core |
13 | 2 | J. Wienke | # create and edit @setup.cfg@ |
14 | 2 | J. Wienke | #* 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 |
15 | 2 | J. Wienke | #* especially, replace @protocolroot@ in section @[proto]@ with the path to the RSBPRobotocol files (e.g. protocolroot=${prefix}/share/RSBProtocol) |
16 | 2 | J. Wienke | #* other available options (besides standard ones from python): |
17 | 2 | J. Wienke | #** @protoc@ in section @[proto]@: The protoc compiler used to generate the protocol. If not specified @PATH@ is used. |
18 | 2 | J. Wienke | #** @format@ in section @[doc]@: either "html" or "pdf" for the API documentation generation |
19 | 2 | J. Wienke | #** @verbose@ in section @[doc]@: bool flag to control verbose output of the generation tool epydoc |
20 | 2 | J. Wienke | #** @spread@ in sections @[coverage]@ and @[test]@: path to the spread executable used for coverage generation and unit testing. @PATH@ is used if not specified |
21 | 2 | J. Wienke | #* An exemplary @setup.cfg@ file could look like this: |
22 | 1 | S. Wrede | <pre> |
23 | 2 | J. Wienke | [proto] |
24 | 2 | J. Wienke | protocolroot=/your/prefix/share/RSBProtocol |
25 | 2 | J. Wienke | [test] |
26 | 2 | J. Wienke | spread=/your/prefix/sbin/spread |
27 | 2 | J. Wienke | [coverage] |
28 | 2 | J. Wienke | spread=/your/prefix/sbin/spread |
29 | 2 | J. Wienke | </pre> |
30 | 2 | J. Wienke | # start building and installation |
31 | 2 | J. Wienke | <pre> |
32 | 2 | J. Wienke | export PYTHONPATH=$prefix/lib/python2.X/site-packages |
33 | 1 | S. Wrede | python setup.py build |
34 | 1 | S. Wrede | python setup.py install --prefix=$prefix |
35 | 1 | S. Wrede | </pre> |
36 | 1 | S. Wrede | |
37 | 1 | S. Wrede | Afterwards, @import rsb@ should be possible in a python shell. |