[vtk-developers] Removed "lib" prefix from python modules

David Gobbi david.gobbi at gmail.com
Fri Sep 24 10:29:27 EDT 2010


Hi Pat,

I didn't change anything in ParaView, I'll leave that to the ParaView team.

But here is a caveat: setting PYTHON_MODULE_PREFIX might not be
enough because there is a bug in CMake's Modules/FindPythonLibs.cmake.
It does not actually set the prefix of the module, it only sets the
prefix in the name of the "init" function.  I've fixed this bug in
VTK's copy of FindPythonLibs.cmake, and someone should copy
my changes from this file into CMake.

Because of this bug in CMake, it might be necessary for ParaView to
set a null prefix for every python module that it builds, i.e.

SET_TARGET_PROPERTIES(... PROPERTIES PREFIX "")

But maybe ParaView uses VTK's FindPythonLibs.cmake instead of the
one from CMake... I don't know.

  David

On Fri, Sep 24, 2010 at 8:12 AM, pat marion <pat.marion at kitware.com> wrote:
> Not sure if you've done this already David, but there are two files in
> paraview that will need updating:
>
> CoProcessing/CoProcessor/CMakeLists.txt:SET(PYTHON_MODULE_PREFIX
> ${CMAKE_SHARED_LIBRARY_PREFIX})
> Utilities/VTKPythonWrapping/Executable/CMakeLists.txt:
> SET(PYTHON_MODULE_PREFIX "lib")
>
> PYTHON_MODULE_PREFIX can be left undefined, or set to the empty string.  It
> is used by FindPythonLibs.cmake to create "init[prefix][modulename]()"
> references.
>
> Pat



More information about the vtk-developers mailing list