When I install flann from my conda package but py-sdm from develop, it doesn't find `libflann.so` properly. Apparently putting the path (from `cyflann.get_flann_lib()`) into `extra_link_args` isn't sufficient; we may need to munge around with `install_name_tool` or some crap. :(
Okay, here's the deal as it is on my laptop.
On OSX, when you link to a shared library, the linker doesn't care what you told it: the path that it puts in the binary is the "install name", which can be read by `otool -D`:
```
$ otool -D /usr/local/anaconda/lib/libflann.dylib
/usr/local/anaconda/lib/libflann.dylib:
libflann.dylib
```
Typically, the install name would be a full path. The reason that it's not is that I installed this flann library with Anaconda. In that case, since the dylibs may be included in multiple conda envs, they can't include a real install name. So conda does a bunch of `install_name_tool -change`s to make everything work out. [Explanation](https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/fUpqjkK5jEI).
So, if you build py-sdm as a conda package, all is well. If you build py-sdm normally and are linking against a normal flann, all is well. It's only when you mix and match that there's an issue, which probably is only an issue for me. :)
To fix, just `install_name_tool -change libflann.dylib /usr/local/anaconda/lib/libflann.dylib sdm/_np_divs_cy.so` (as of now; if there's more than one C extension or something in the future this might change).
A `conda develop` command (https://github.com/conda/conda/issues/498) would help with this.