[vtk-developers] Fwd: OSX build links directly with Python binary - avoidable?

Matthew Brett matthew.brett at gmail.com
Mon May 4 12:05:22 EDT 2015


Hi,

On Mon, May 4, 2015 at 5:58 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Matthew,
>
> Frameworks/Python.framework/Versions/2.7/Python is a framework
> library (a dylib without a suffix).  In my build (probably yours too),
> cmake links all VTK python libs to libpython2.7.dylib, which is a
> symbolic link to Frameworks/Python.framework/Versions/2.7/Python.
>
> So this "binary" is none other than the libpython dynamic library,
> and it isn't too surprising to have it show up with "otool -L".
>
> I tried manually linking libCommonCorePython.so without using
> libpython in the link line, and it worked fine. And linking the other
> libs like libvtkWrappingPython27Core without libpython works if
> I add "-undefined dynamic_lookup".  So this seems like a
> reasonable thing to do.

I believe this is the standard Python extension behavior, and would
help a great deal, because it would mean it should be possible to
package vtk into a '.whl' file that can be installed (via 'pip install
vtk') into any of the standard Python installations on OSX (including
system Python, Python.org Python, homebrew, macports) without
recompiling.

Cheers,

Matthew


More information about the vtk-developers mailing list