diff --git a/README.md b/README.md index 5ed3f98..a409535 100644 --- a/README.md +++ b/README.md @@ -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: ```bash -wget https://github.com/kentonv/capnproto/archive/master.zip -unzip master.zip -cd capnproto-master/c++ -./setup-autotools.sh -autoreconf -i +wget http://capnproto.org/capnproto-c++-0.3.0-rc2.tar.gz +tar xzf capnproto-c++-0.3.0-rc2.tar.gz +cd capnproto-c++-0.3.0-rc2 ./configure -make -j6 check +make -j8 check sudo make install sudo ldconfig ``` diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index 73ef2c2..de1cecd 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -1047,7 +1047,7 @@ def load(file_name, display_name=None, imports=[]): loaded, you use it much like any other Module:: 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 message = capnp.MallocMessageBuilder() person = message.initRoot(addressbook.Person) diff --git a/docs/install.rst b/docs/install.rst index c6b79ff..583d453 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -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 `_ 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 - unzip master.zip - cd capnproto-master/c++ - ./setup-autotools.sh - autoreconf -i + wget http://capnproto.org/capnproto-c++-0.3.0-rc2.tar.gz + tar xzf capnproto-c++-0.3.0-rc2.tar.gz + cd capnproto-c++-0.3.0-rc2 ./configure - make -j6 check + make -j8 check sudo make install 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 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 --------------------- @@ -47,7 +45,7 @@ If you don't use pip, you will need to manually install Cython, and a setuptools 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 checkout develop diff --git a/docs/quickstart.rst b/docs/quickstart.rst index a185de3..102665f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -108,7 +108,7 @@ For all primitive types, from the Cap'n Proto docs: - Floating-point: Float32, Float64 - 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.name = 'Alice'