Skip to content

Instantly share code, notes, and snippets.

@BJTerry
Created June 15, 2016 05:49
Show Gist options
  • Save BJTerry/e561b956d963a2fe4c4623fb06f49266 to your computer and use it in GitHub Desktop.
Save BJTerry/e561b956d963a2fe4c4623fb06f49266 to your computer and use it in GitHub Desktop.
How to install cgal-swig-bindings on Mac OS X with homebrew for Python
# This information was impossible to find
brew install cgal
brew install swig
git clone https://github.com/CGAL/cgal-swig-bindings.git
cd cgal-swig-bindings
# Replace the python paths below with the correct version for your system
cmake -DCGAL_DIR=/usr/local/lib/CGAL \
-DBUILD_PYTHON=ON \
-DBUILD_JAVA=OFF \
-DPYTHON_LIBRARIES=/usr/local/lib/python2.7 \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-DPython_FRAMEWORKS=/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Headers
make
# Confirm that it works. When a window pops up you have to close it to continue
cd examples/python
PYTHONPATH=../../build-python bash test.sh
@BJTerry
Copy link
Author

BJTerry commented Jun 15, 2016

If you don't do this you get the following error when running the examples:

PyThreadState_Get: no current thread

@a-jacobo
Copy link

a-jacobo commented Jul 1, 2016

HI,
I followed your instructions and it all seems to work but how should I do now so that my default python installations finds the bindings? where should I copy them?

Best,
Adrian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment