IMP logo
IMP Manual  for IMP version 2.16.0
pyonlymod.md
1 Python-only modules {#pyonlymod}
2 ===================
3 
4 Most %IMP modules are mostly written in C++ and provide a Python wrapper.
5 However, it is also possible to write modules entirely in Python. To do this,
6 
7 - add `python_only=True` to the module's `dependencies.py` file.
8 - don't provide a SWIG input file (`swig.i-in`) in the module's `pyext`
9  directory (it will be ignored).
10 - provide an `__init__.py` in the module's `pyext/src` directory if needed.
11 - any programs in the module's `bin` subdirectory should be Python scripts.
12 - utility C++ headers can still be provided in the module's `include` directory
13  but no `.cpp` files can be included in the `src` directory.
14 
15 The advantage of making a Python-only module is that it is much faster to
16 build (since it does not need to be compiled).
17 
18 For good examples, see the `test`, `sampcon`, and `saxs_merge` modules.