The deploy script is used to deploy python and c++ code into SWIG interface files appropriately.
The reason it was created was because working with .i files to put a mixture of C++ and Python code is not practical for testing and development process.
In SWIG, there are three sections:
Inline
---------
C++ code will be wrapped by SWIG.
In SWIG .i files the inline code is marked with:
%inline %{
C++ code
%}
In deploy.py supporting files the code to be pasted into .i files is marked with:
//<inline(NAME)>
C++ code
//</inline(NAME)>
Code
-------
C++ code will be pasted and compiled into the wrapped module but will not be wrapped by SWIG.
In SWIG .i files the code is marked with:
%{
C++ code
%}
Similarly, for deploy.py supporting files should be marked with:
//<code(NAME)>
C++ code
//</code(NAME)>
Pythoncode
--------------
Python code allows you to insert Python code into the final Python module.
In SWIG .i files, the extra python code is marked with:
%pythoncode %{
Py code
%}
In deploy.py supporting python files, it is marked with:
#<pycode(NAME)>
Py code
#</pycode(NAME)>
Using deploy.py
------------------
Make sure that all of the 3 code markers exist in the interface files and deploy.py support files (C++ or Python).