Prerequisites
Make sure you have the following prerequisites installed. The commands listed below show how to install the prerequisites on Ubuntu Linux.
- C++ compiler (g++ or similar):
- cmake:
- Boost:
- zlib:
- OpenSSL:
- Python development libraries:
- Protocol Buffers Python libraries:
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install libboost-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev
sudo apt-get install python-dev
sudo apt-get install python-protobuf
Building RCFProto Python bindings
- From the root directory of the distribution, run cmake to generate the makefile:
- Run make:
- The python/bin/x86 or python/bin/x64 directory should now contain _rcfproto.so .
mkdir make
cd make
cmake -G "Unix Makefiles" ..
make
Installing the RCFProto Python module
- From the root directory of the distribution, change directory to the src directory:
- Install the RCFProto Python module (and Google.ProtocolBuffers, if not already installed)::
cd python/src
python setup.py install
Running the Python demo server and client
- From the root directory of the distribution, cd to the demo directory:
- Generate source code for Protocol Buffer messages:
- Run the demo server:
- Run the demo client (in a different command prompt):
cd python/demo
protoc Demo.proto --python_out=.
python DemoServer.py
python DemoClient.py