[vtkusers] vtkpython on mac os?
Matthew Brett
matthew.brett at gmail.com
Thu Jan 28 15:18:23 EST 2016
Hi,
On Thu, Jan 28, 2016 at 9:22 AM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> @Tom
>
> I haven't looked at it at all yet but I have a hunch.I am wondering if this
> is an artifact of how, starting with El Captain, the system python is kind
> of locked down by be Apple. If that is the case, switching to a third party
> python (from fink, macports or homebrew) would solve it.
>
> If not that, my next guess is that it is the library path management we do
> in the packaging process to make redistributable binaries that causes the
> problem. For windows and mac we do these things in different (platform
> specific) ways which would explain why it can be done on linux and windows
> but not mac.
>
> In my personal use I either build vtk from source (most of my work) or run
> from the bin directory (for intro to vtk courses). However I really would
> like to get this nailed down. Likely then we can incorporate the binaries
> into a wheel and make "pip install vtk" just work. Unfortunately it is
> unknown when/if I'll find the time to investigate thoroughly (or solve it
> once I do eh?).
Actually, now I think about it, with the benefit of a couple of years
of building wheels, I wonder whether this might be possible with only
a small amount of effort.
My plan would be to build vtk with Python bindings using the standard
recipe, and the hoover up the pieces into the wheel directory
structure afterwards.
The previous block that I ran into was the following problem :
http://vtk.1045678.n5.nabble.com/Fwd-OSX-build-links-directly-with-Python-binary-avoidable-td5731734.html
Specifically, the last time I tried, the vtk libraries contained
absolute path links to the Python dynamic lib, meaning that the built
vtk could only be used with Python at exactly that path, whereas
wheels must work for Pythons at any path, such as Pythons in
virtualenvs. The fix David G suggested was to use "-undefined
dynamic_lookup" when linking to Python. How hard would it be to apply
that fix? (I'm afraid my cmake-fu is not good). With that done, it's
possible I could work out the rest (no promises).
Cheers,
Matthew
More information about the vtkusers
mailing list