Fix up docs for new C++ RC

This commit is contained in:
Jason Paryani
2013-08-30 23:13:20 -07:00
parent 76796f8d75
commit 3772198e82
4 changed files with 12 additions and 16 deletions

View File

@@ -7,13 +7,11 @@ More thorough docs are available at [http://jparyani.github.io/capnpc-python-cpp
First you need a system-wide installation of the Cap'n Proto C++ library >= 0.3. Unfortunately, as of now, that means you have to build from the HEAD of Cap'n Proto. Follow these instructions to do so: First you need a system-wide installation of the Cap'n Proto C++ library >= 0.3. Unfortunately, as of now, that means you have to build from the HEAD of Cap'n Proto. Follow these instructions to do so:
```bash ```bash
wget https://github.com/kentonv/capnproto/archive/master.zip wget http://capnproto.org/capnproto-c++-0.3.0-rc2.tar.gz
unzip master.zip tar xzf capnproto-c++-0.3.0-rc2.tar.gz
cd capnproto-master/c++ cd capnproto-c++-0.3.0-rc2
./setup-autotools.sh
autoreconf -i
./configure ./configure
make -j6 check make -j8 check
sudo make install sudo make install
sudo ldconfig sudo ldconfig
``` ```

View File

@@ -1047,7 +1047,7 @@ def load(file_name, display_name=None, imports=[]):
loaded, you use it much like any other Module:: loaded, you use it much like any other Module::
addressbook = capnp.load('addressbook.capnp') addressbook = capnp.load('addressbook.capnp')
print addressbook.qux # qux is a top level constant print addressbook.qux # qux is a top level constant in the addressbook.capnp schema
# 123 # 123
message = capnp.MallocMessageBuilder() message = capnp.MallocMessageBuilder()
person = message.initRoot(addressbook.Person) person = message.initRoot(addressbook.Person)

View File

@@ -8,13 +8,11 @@ C++ Cap'n Proto Library
You need to install the C++ Cap'n Proto library first. It requires a C++ compiler with C++11 support, such as GCC 4.7+ or Clang 3.2+. Follow installation docs at `http://kentonv.github.io/capnproto/install.html <http://kentonv.github.io/capnproto/install.html>`_ with an added `sudo ldconfig` after you're done installing, or if you're feeling lazy, you can run the commands below:: You need to install the C++ Cap'n Proto library first. It requires a C++ compiler with C++11 support, such as GCC 4.7+ or Clang 3.2+. Follow installation docs at `http://kentonv.github.io/capnproto/install.html <http://kentonv.github.io/capnproto/install.html>`_ with an added `sudo ldconfig` after you're done installing, or if you're feeling lazy, you can run the commands below::
wget https://github.com/kentonv/capnproto/archive/master.zip wget http://capnproto.org/capnproto-c++-0.3.0-rc2.tar.gz
unzip master.zip tar xzf capnproto-c++-0.3.0-rc2.tar.gz
cd capnproto-master/c++ cd capnproto-c++-0.3.0-rc2
./setup-autotools.sh
autoreconf -i
./configure ./configure
make -j6 check make -j8 check
sudo make install sudo make install
sudo ldconfig sudo ldconfig
@@ -27,7 +25,7 @@ Using pip is by far the easiest way to install the library. After you've install
pip install -U setuptools pip install -U setuptools
pip install capnp pip install capnp
You only need to run the setuptools line if you have a setuptools older than v0.8.0. You can control the compiler version with the environment variable CC, ie. `CC=gcc-4.8 pip install capnp`. You only need to run the setuptools line if you have a setuptools older than v0.8.0, and the cython line if you have a version older than v0.19.1.
From Source From Source
--------------------- ---------------------
@@ -47,7 +45,7 @@ If you don't use pip, you will need to manually install Cython, and a setuptools
Development Development
------------------- -------------------
Clone the repo from https://github.com/jparyani/capnpc-python-cpp.git and use the `develop` branch. I'll probably ask you to redo pull requests that target `master` and aren't easily mergable to `develop`.:: Clone the repo from https://github.com/jparyani/capnpc-python-cpp.git and use the `develop` branch. I'll probably ask you to redo pull requests that target `master` and aren't easily mergable to `develop`::
git clone https://github.com/jparyani/capnpc-python-cpp.git git clone https://github.com/jparyani/capnpc-python-cpp.git
git checkout develop git checkout develop

View File

@@ -108,7 +108,7 @@ For all primitive types, from the Cap'n Proto docs:
- Floating-point: Float32, Float64 - Floating-point: Float32, Float64
- Blobs: Text, Data - Blobs: Text, Data
You can just assign straight to the variable with the corresponding Python type. For Blobs, you just use strings. Assignment happens just by using the `.` syntax on the object you contstructed above:: You can assign straight to the variable with the corresponding Python type. For Blobs, you use strings. Assignment happens just by using the `.` syntax on the object you contstructed above::
alice.id = 123 alice.id = 123
alice.name = 'Alice' alice.name = 'Alice'