#cmakedefine PARAVIEW_USE_UNIFIED_BINDINGS
#cmakedefine NO_PYTHON_BINDINGS_AVAILABLE
#ifdef NO_PYTHON_BINDINGS_AVAILABLE
#undef PARAVIEW_USE_UNIFIED_BINDINGS
#endif
#ifdef PARAVIEW_USE_UNIFIED_BINDINGS
#include "vtkPython.h"
#include "vtkPythonInterpreter.h"
#endif

#include "vtkClientServerInterpreter.h"

#ifndef PARAVIEW_BUILD_SHARED_LIBS
#cmakedefine PARAVIEW_BUILD_SHARED_LIBS
#endif
#if defined(PARAVIEW_BUILD_SHARED_LIBS) && defined(_WIN32)
# define VTK_WRAP_CS_EXPORT __declspec(dllexport)
#else
# define VTK_WRAP_CS_EXPORT
#endif

#ifdef PARAVIEW_USE_UNIFIED_BINDINGS
extern "C" void real_init@BARE_TARGET@Python(const char *modulename);

void init@BARE_TARGET@Python()
{
  static const char modulename[] = "@BARE_TARGET@Python";
  real_init@BARE_TARGET@Python(modulename);
}
#endif

@CXX_CONTENTS@

extern "C" void VTK_WRAP_CS_EXPORT @CS_TARGET@_Initialize(
  vtkClientServerInterpreter *csi)
{
  // silence unreferenced var warning.
  (void) csi;

#ifdef PARAVIEW_USE_UNIFIED_BINDINGS
  if (!vtkPythonInterpreter::IsInitialized())
    {
    vtkPythonInterpreter::Initialize();
    }

  static bool initialized = false;

  if (!initialized)
    {
    initialized = true;
    PyImport_AppendInittab("@BARE_TARGET@Python", init@BARE_TARGET@Python);
    }

  csi->Load("@BARE_TARGET@");
#endif

@CXX_CONTENTS2@
}
