[vtk-developers] vtkMatplotlibMathTextUtilities.cxx and vtkPython.h

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Feb 19 13:38:24 EST 2013


On Tue, Feb 19, 2013 at 11:49 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Tue, Feb 19, 2013 at 9:21 AM, David Lonie <david.lonie at kitware.com> wrote:
>> On Tue, Feb 19, 2013 at 10:53 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>
>>> I've put a topic on gerrit that tries to resolve the dependency by adding
>>> a new python module that is distinct from the wrappers.  Can you give
>>> it a try?  You might have to modify the Matplotlib/CMakeLists.txt, I don't
>>> have matplotlib on my machine so I couldn't test that part.
>>
>> Your patch builds as-is and the matplotlib tests pass. Thanks David!
>
> Could Utkarsh or Marcus take a look to make sure that the module stuff is
> set up right?  It's the PYTHON_LIBRARIES that are my main concern.
> I'm not sure how Matplotlib/CMakeLists.txt gets the PYTHON_LIBRARIES
> cmake variable.  Should the Matplotlib module automatically link to the
> python libraries simply by virtue of the fact that it depends on the vtkPython
> module?  And if so, exactly how should that be set up?
>
I added some comments to the commit, but I think the module should be
in Utilities rather than ThirdParty. If your new module calls
find_package(PythonLibs), and matplotlib depends upon it, then when it
calls find_package(PythonLibs) it will make use of the same cache
variables as Python was already found. Brad may have other thoughts,
but that should be enough to ensure that a consistent Python is found
in this case.

Marcus



More information about the vtk-developers mailing list