Skip to content

Instantly share code, notes, and snippets.

@nicolasH
Created October 9, 2011 05:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolasH/1273362 to your computer and use it in GitHub Desktop.
Save nicolasH/1273362 to your computer and use it in GitHub Desktop.
Compiling py2cairo for Snow Leopard and python 2.6.7
#my messy part: add and tweak until it works. Usually followed by remove until it breaks to find the minimal necessary, but not this time.
python waf clean
export PATH=/usr/local/Cellar/python2.6.7/2.6.7/bin:$PATH
export PYTHONPATH=/usr/local/Cellar/python2.6.7/2.6.7
export LD_LIBRARY_PATH=/usr/local/Cellar/python2.6.7/2.6.7:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/Cellar/python2.6.7/2.6.7/lib:$LD_LIBRARY_PATH
export LINKFLAGS='-search_dylibs_first -L /usr/local/Cellar/python2.6.7/2.6.7/lib/'
#from stackoverflow http://stackoverflow.com/questions/6886578/how-to-install-pycairo-1-10-on-mac-osx-with-default-python
export ARCHFLAGS='-arch x86_64'
export CC=/usr/bin/gcc
export PKG_CONFIG_PATH=/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/
python waf configure
python waf build
#To check against which python the lib was linked
otool -L build_directory/src/_cairo.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment