Building Boost
Boost is used in the NodeBox graph library. Here are the instructions for building it. Note that Boost and its bindings are already included in the NodeBox? Graph library; these instructions are for people who want to roll their own from scratch.
Getting Boost and BJam
Download both the boost and bjam package.
Building BJam
Boost uses its own make variant, called BJam. It's simple enough to compile:
cd boost-jam-3.1.16 sh ./build.sh sudo mkdir -p /usr/local/bin sudo cp bin.macosxx86/bjam /usr/local/bin
Building Boost
cd boost_1_34_1/ bjam stage
- Set the python version and python root environment variables:
export PYTHON_VERSION=2.3 export PYTHON_ROOT=/System/Library/Frameworks/Python.framework/Versions/2.3
Alternatively, some systems may have the following path (without a System folder):export PYTHON_VERSION=2.3 export PYTHON_ROOT=/Library/Frameworks/Python.framework/Versions/2.3
- Compile Boost:
bjam stage
- All the boost libraries are now in the stage folder.
Compiling the Boost Graph Library (BGL) Python bindings
- Download the http://www.osl.iu.edu/~dgregor/bgl-python/.
- Extract (I use /Users/fdb/Python/bgl-python).
- Open the Terminal an cd into the source folder:
cd /Users/fdb/Python/bgl-python
- Set the environment variables:
export BOOST_ROOT=/Users/fdb/Source/boost
- Build the bindings:
bjam stage
- All the required files are now in the python folder.
Note: For scripts, you sometimes need to put the libboost_python.dylib in the same folder as your Python script.
