Building RRDTool Python bindings on OS X

on November 2nd, 2015 by Hades | No Comments »

Use DarwinPorts to build (but not install) rrdtool
MacBook-Pro-Hades:~ hades$ sudo port build rrdtool
---> Computing dependencies for rrdtool
---> Fetching distfiles for rrdtool
---> Verifying checksums for rrdtool
---> Extracting rrdtool
---> Configuring rrdtool
---> Building rrdtool

Change into binding/python under the work directory, eg
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_rrdtool/rrdtool/work/rrdtool-1.5.4/bindings/python/

Build and install the extension

sudo python build
sudo python install

Test with:
MacBook-Pro-Hades:python hades$ python
Python 2.7.10 (default, Aug 22 2015, 20:33:39)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rrdtool