[vtk-developers] python wrapping

David E DeMarle dave.demarle at kitware.com
Wed Mar 11 09:50:38 EDT 2009


My knowledge is scant, but here it goes anyway:

1)
VTK_WRAP_PYTHON3(${NAME}Python KitPython_SRCS "${WRAP_LIST}")
Will wrap the c++ files in WRAP_LIST into python, outputting a list of
transformed files into KitPython_SRCS.

2)
ADD_LIBRARY(${NAME}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})

Will take those outputs, and some optional additional ones, and create
a library.

3) PYTHON_ADD_MODULE(${NAME}Python ${NAME}PythonInit.cxx)

Will produce a python module that links in the library so that the
wrapped code is more easily callable via python.

That is what ParaView's WRAP_PLUGIN_FOR_PYTHON macro does anyway.

cheers,
Dave

On Tue, Mar 10, 2009 at 1:32 PM, Burlen Loring
<burlen.loring at kitware.com> wrote:
> Hi all,
>
> I'd like to understand more about how the VTK python wrapping works. Can
> anyone recommend a starting point? Also of interest what CMake's role in
> this is. What macros available, when to use such and such a macro, what the
> purpose of arguments to the macros are?
>
> Thanks
> Burlen
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



-- 
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



More information about the vtk-developers mailing list