[vtk-developers] PythonCore module removal

David Gobbi david.gobbi at gmail.com
Tue Jun 12 19:06:29 EDT 2012


I've pushed a patch to gerrit that only adds python version numbers to
the filenames and leaves the target names alone.  This will make it
easier for ParaView et al to find the libs, but target_link_libraries and
include_directories will still be needed.  This change won't, by itself,
help with David Lonie's MathText module.

 - David


On Tue, Jun 12, 2012 at 3:54 PM, David Cole <david.cole at kitware.com> wrote:
> Sure you can, just set the OUTPUT_NAME target property:
>
> $ cmake --help-property OUTPUT_NAME
> cmake version 2.8.8
>   OUTPUT_NAME
>        Output name for target files.
>
>        This sets the base name for output files created for an executable or
>        library target.  If not set, the logical target name is used by
>        default.
>
>
>
> On Tue, Jun 12, 2012 at 5:18 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> Hi Marcus,
>>
>> If I can add version numbers to the library name but keep the target
>> name as "vtkPythonCore", then that seems ideal.
>>
>>  - David
>>
>>
>> On Tue, Jun 12, 2012 at 2:37 PM, Marcus D. Hanwell
>> <marcus.hanwell at kitware.com> wrote:
>>>
>>> Hi David,
>>>
>>> The target name is not well defined now though, and so you make it
>>> difficult to link to. Why not set a consistent target name, and use
>>> the the target properties to change its name on disk - this would make
>>> code wishing to link to it far simpler than having to get the
>>> currently used Python version.
>>>
>>> I can propose a patch, but I think it is overly complicated to
>>> introduce a target name that changes. We could then use
>>> include_directories and target_link_libraries in these cases for
>>> ParaView.
>>>
>>> Marcus
>>>
>>> On Tue, Jun 12, 2012 at 4:01 PM, David Gobbi <david.gobbi at gmail.com>
>>> wrote:
>>> > Hi Kyle,
>>> >
>>> > Include directories have to be set up with include_directories(), just
>>> > like
>>> > in the pre-modular days.  After the vtk-python-versioned-libs merge,
>>> > PythonCore is no longer a module, it's a plain old VTK library.
>>> >
>>> >  - David
>>> >
>>> >
>>> > On Tue, Jun 12, 2012 at 1:42 PM, Kyle Lutz <kyle.lutz at kitware.com>
>>> > wrote:
>>> >>
>>> >> Hi David Gobbi,
>>> >>
>>> >> We are also having issues with this change in ParaView. A ParaView
>>> >> topic brought in VTK-master which brought in your topic
>>> >> ('vtk-python-versioned-libs') leading to the following compilation
>>> >> errors:
>>> >>
>>> >>
>>> >>
>>> >> /home/kyle/ParaView/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInterpretor.cxx:16:
>>> >> error: vtkPython.h: No such file or directory
>>> >>
>>> >> What is the proper way to set up the include and link paths for the
>>> >> new python wrapping code?
>>> >>
>>> >> -kyle
>>> >>
>>> >> On Tue, Jun 12, 2012 at 3:34 PM, David Gobbi <david.gobbi at gmail.com>
>>> >> wrote:
>>> >> > Hi David,
>>> >> >
>>> >> > This just depends on python, right?  Not the python wrappers?
>>> >> > So it could do its own find_package(PythonLibs REQUIRED)
>>> >> > and set up the include_directories and link_libraries, completely
>>> >> > independent of the wrappers.  I'm not saying it would be easy...
>>> >> > some important things like the generation of vtkPythonConfigure.h
>>> >> > and choosing between the release & debug versions of the python
>>> >> > library are tied up with wrapping and would need to be refactored.
>>> >> >
>>> >> > Are you sure the class should have an innocuous name like
>>> >> > "vtkMathTextUtilities" when it requires python, matplotlib, and
>>> >> > (I'm guessing) latex in order to work?
>>> >> >
>>> >> >  - David
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Tue, Jun 12, 2012 at 12:24 PM, David Lonie
>>> >> > <david.lonie at kitware.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> Hi David,
>>> >> >>
>>> >> >> I'm working on a new module that requires python, and we noticed
>>> >> >> that
>>> >> >> you
>>> >> >> removed the PythonCore module last week. Is there any way to
>>> >> >> restore
>>> >> >> the
>>> >> >> module and preserve the new functionality you needed for library
>>> >> >> versioning?
>>> >> >> I've pushed a changeset for my new module, but we cannot merge it
>>> >> >> as it
>>> >> >> needs to explicitly depend on PythonCore:
>>> >> >>
>>> >> >> http://review.source.kitware.com/#/c/6177/
>>> >> >>
>>> >> >> Or is there another way that this dependency can be added without
>>> >> >> an
>>> >> >> actual PythonCore module?
>>> >> >>
>>> >> >> Thanks,
>>> >> >>
>>> >> >> Dave



More information about the vtk-developers mailing list