Hello,
I have some code I’d like to NOT wrap in Python. In my extension’s MRML directory, I created some “internal” classes that should ideally not be exposed to the user. I’ve been looking at 3 options:
- A preprocessor defined value I could use to surround the code I don’t need to wrap using #if and #endif. I couldn’t find anything obvious on google nor using grep on the Slicer and VTK source trees.
- Exclude a full file using CMake source file properties. I tried
set_source_files_properties
withWRAP_EXCLUDE_PYTHON 1
but the xxxPython.cxx file is still generated and compiled. - The third option I can think of is to create a separate library to hide all my private classes. I haven’t tried yet. I fear the CMake part is not going to be trivial since I will need to compile and link against VTK/Slicer libraries but the Slicer CMake macros will likely enable Python wrapping.
Any thoughts before I go deeper in this rabbit hole?
Thanks