Here is posted old stuff from another Topic:
OK, back to making a LeapPython file for importing into Blender2.69. I used this process to try again:
February 8 by upretirementman
After a couple of hours struggling, I managed to recompile the libLeapPython.dylib in order for it to work in Blender 2.69.
(This is in OS X 10.9.1 Mavericks)
These are the instructions:
First, get in a folder the following files in location where it can be found:
Leap.h
Leap.i
LeapMath.h
libLeap.dylib
Then, using swig (2.11 in my case), run the following command in a python 3.3 Terminal window:
swig -c++ -python -py3 -o LeapPython.cpp -nofastinit -interface libLeapPython.dylib -threads -module LeapPython Leap.i
This will generate the following files:
LeapPython.cpp
LeapPython.h
LeapPython.py (This is what is imported)
I used the swig version 2.11 for this:
Now, with these files and clang in a python 3.3 Terminal window, you can compile the libLeapPython.dylib that you need.
In my case a Universal version:
clang++ -arch i386 -arch x86_64 -I/projects/blender/lib/leap/src/my_leap/Archive/LeapPython.cpp libLeap.dylib -shared -o libLeapPython.dylib
This worked and produced:
libLeapPython.dylib (This is the new LeapPython 3.3 dynamic library)
I hope this helps! smiley
However, trying to use it in Blender, it did not work. Take a look at the directions and see where I messed up. Thanks.