PARAVIEW_USE_UNIFIED_BINDINGS = ON will not build

python

(Ramon Moral) #1

I am trying to get a Python Binding of the SpyPlotReader family of components. I am working an App were I need to import spcth files. VTK does not have this family of readers.

I have tried this build using Paraview versions 5.4 through nightly and it does not work.

Any ways when I try to compile with the intent of having a python binding for every CS wrapping I get the following error:

    [ 61%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVVTKExtensionsDefaultCS.dir/vtkPVVTKExtensionsDefaultCSInit.cxx.o
    /home/rmoral/build/build2/Wrapping/ClientServer/vtkPVVTKExtensionsDefaultCSInit.cxx: In function ‘void vtkPVVTKExtensionsDefaultCS_Initialize(vtkClientServerInterpreter*)’:
    /home/rmoral/build/build2/Wrapping/ClientServer/vtkPVVTKExtensionsDefaultCSInit.cxx:51:63: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)()’ {aka ‘_object* (*)()’} [-fpermissive]
         PyImport_AppendInittab("vtkPVVTKExtensionsDefaultPython", initvtkPVVTKExtensionsDefaultPython);
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.6m/Python.h:124,
                     from /home/rmoral/build/ParaView-5.6.0-311-g25d4aa022a/VTK/Utilities/Python/vtkPython.h:80,
                     from /home/rmoral/build/build2/Wrapping/ClientServer/vtkPVVTKExtensionsDefaultCSInit.cxx:7:
    /usr/include/python3.6m/import.h:121:17: note:   initializing argument 2 of ‘int PyImport_AppendInittab(const char*, PyObject* (*)())’
         PyObject* (*initfunc)(void)
         ~~~~~~~~~~~~^~~~~~~~~~~~~~~
    make[2]: *** [Wrapping/ClientServer/CMakeFiles/vtkPVVTKExtensionsDefaultCS.dir/build.make:63: Wrapping/ClientServer/CMakeFiles/vtkPVVTKExtensionsDefaultCS.dir/vtkPVVTKExtensionsDefaultCSInit.cxx.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:51384: Wrapping/ClientServer/CMakeFiles/vtkPVVTKExtensionsDefaultCS.dir/all] Error 2
    make: *** [Makefile:152: all] Error 2

(Ben Boeckel) #2

Unified bindings was an experiment which didn’t meet its goals, so it has sort of bit-rotted.

Any ways when I try to compile with the intent of having a python binding for every CS wrapping I get the following error:

With unified bindings, CS wrapping assumes Python wrapping exists. It doesn’t force its creation. The proper way is to do Python wrapping of the required modules similarly to how CS bindings are created.


(Ramon Moral) #3

Okay.

So how does one build paraview so the build creates Python wrapping of the SpyPlot file readers?
I have not been able to find that option.


(Ben Boeckel) #4

PARAVIEW_ENABLE_PYTHON should do it.