# Wrapping Filter of Plugin

**URL:** https://discourse.paraview.org/t/wrapping-filter-of-plugin/1875
**Category:** Development
**Created:** [May 16, 2019, 9:10pm UTC](https://discourse.paraview.org/t/wrapping-filter-of-plugin/1875 "2019-05-16T21:10:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![leonharv](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leonharv/32/1512_2.png) [@leonharv](https://discourse.paraview.org/u/leonharv)
#### Post date: [May 16, 2019, 9:10pm UTC](https://discourse.paraview.org/t/wrapping-filter-of-plugin/1875/1 "2019-05-16T21:10:40Z")

</div>

Hi,  
I wrote a plugin, which delivers a filter in C++. Now I would like to wrap my plugin with python. My file-structure looks like this:

- CMakeLists.txt
- Plugin
  - paraview.plugin
  - CMakeLists.txt
  - Filter
    - CMakeLists.txt
    - vtk.module
    - Filter.xml
    - Filter.cxx
    - Filter.h

I tried to wrap my vtk module with python too using the following Plugin/Filter/CMakeLists.txt:

```
set(classes
  Filter)

vtk_module_add_module(VTK::CustomFilters
  CLASSES ${classes})

paraview_add_server_manager_xmls(
  XMLS Filter.xml)

vtk_module_wrap_python(
  MODULES VTK::CustomFilters
)

```

How should I do it correct?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [October 17, 2019, 1:40pm UTC](https://discourse.paraview.org/t/wrapping-filter-of-plugin/1875/2 "2019-10-17T13:40:20Z")

</div>

`vtk_module_wrap_python` needs to be called from the same level as `vtk_module_build`. That is when the modules have all of the relevant information attached to them (headers, dependencies, etc.) that is used by the wrapping code.
