-
Notifications
You must be signed in to change notification settings - Fork 0
Generating Bindings
PyChaste uses the cppwg package to generate Pybind11 wrappers around Chaste classes. The cppwg package reads an input package_info.yaml
configuration file to determine which classes to wrap. The guidance below describes how to generate PyChaste wrappers.
See the cppwg repository for setup instructions.
To generate bindings, cppwg
needs the C++ headers from Chaste and its dependencies. See the Chaste install guides for instructions on installing Chaste dependencies.
Get the source code for Chaste and PyChaste:
git clone --recursive https://github.com/Chaste/Chaste.git
git clone --recursive https://github.com/Chaste/PyChaste.git Chaste/projects/PyChaste
Configure Chaste and PyChaste:
cd Chaste
mkdir build
cd build
cmake ..
Modify the configuration in package_info.yaml
to add new classes to be wrapped. See Structure of package_info for more details.
The following calls cppwg
to generate the wrappers:
make project_PyChaste_Python_Bindings
The wrappers will be written to PyChaste/dynamic/wrappers
.
For a guide on compiling the wrappers into a Python module, see Building PyChaste from Source.