fortwrap icon indicating copy to clipboard operation
fortwrap copied to clipboard

Minor bugfixes and automation of PyBind11 bindings

Open vegardjervell opened this issue 2 years ago • 0 comments

Edit: We are maintaining a fork at https://github.com/thermotools, and are also automating generation of pybind11 bindings for the C++ wrapper :)

Hi,

It looks like we may be adopting this for our project :) If we do, we will be maintaining a fork at https://github.com/thermotools.

While I was testing it I made some modifications:

  • Added setup.py and moved some files so that pip can be easily utilized.
  • Added sorting of modules before writing FortranISOWrappers.f90, so that modules are compiled in order of dependency. Also fixed bug where modules did not properly include each other.
  • Added name sanitizing before writing c++ interface, to prevent argument names that are reserved keywords in C++
  • Made the ConfigFile parser also read command-line arguments
  • Added code to generate a binding module for PyBind11 (still very experimental, may need manual modifications after being generated.)

vegardjervell avatar Mar 30 '23 14:03 vegardjervell