# Separate builds for core and python wrappers

**URL:** https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937
**Category:** Support
**Created:** [November 30, 2024, 5:05pm UTC](https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937 "2024-11-30T17:05:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dave-Allured](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dave-allured/32/7698_2.png) [@Dave-Allured](https://discourse.vtk.org/u/Dave-Allured)
#### Post date: [November 30, 2024, 5:05pm UTC](https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937/1 "2024-11-30T17:05:23Z")

</div>

I need to build python wrappers separately from the VTK core, in order to support multiple python versions. I can set `VTK_WRAP_PYTHON=OFF` to build core only. Is there a way to build wrappers only, on top of a previous VTK core build?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 30, 2024, 5:36pm UTC](https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937/2 "2024-11-30T17:36:24Z")

</div>

The quick answer is no, the wrapper build is too tightly integrated with the main build. The longer answer is it could be possible, if someone familiar with the wrappers spent a few solid days working on it, but there would still be the question of who would be responsible for maintaining it going forward.

I created the [WrapVTK](https://github.com/dgobbi/WrapVTK) project many years ago as an example of how wrappers (of any sort) could be built external to VTK, but AFAIK no-one has used it for that purpose.

---

<div class="post-metadata">

### Author: ![Dave-Allured](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dave-allured/32/7698_2.png) [@Dave-Allured](https://discourse.vtk.org/u/Dave-Allured)
#### Post date: [November 30, 2024, 6:27pm UTC](https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937/3 "2024-11-30T18:27:15Z")

</div>

@dgobbi Thank you for the concise answer. I suggest that independent building for python and other wrappers would be a worthy addition to the VTK build system. External building is simplified if it can be compartmentalized.

WrapVTK looks interesting. I will check it out, but probably can not spend the time for a proper python implementation.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 3, 2025, 11:01pm UTC](https://discourse.vtk.org/t/separate-builds-for-core-and-python-wrappers/14937/4 "2025-03-03T23:01:19Z")

</div>

Also note that the fate of modules such as `Filters/Python`, `Common/Python`, `Wrapping/PythonCore`, `Rendering/Matplotlib`, not to mention all of the `Testing/Python` code is of serious concern when doing such a split.
