Here are links to the relevant efforts in LFortran for creating Python wrappers automatically:
- Automatic wrappers Fortran -> Python (#133) · Issues · lfortran / lfortran · GitLab
- Pywrap basic functionality (!1307) · Merge requests · lfortran / lfortran · GitLab
Once LFortran matures and can compile most Fortran projects, the workflow that I would like, as a user:
- Use LFortran to compile my code (using the LLVM backend for example), ensure that everything works
- Switch to the
pywrapbackend and generate Python wrappers. At that point we know LFortran fully understands the code, and thus any remaining bugs must be in thepywrapbackend. - I would like LFortran to wrap any modern Fortran code features, such as classes, derived types, coarrays, etc.
I think there could be a huge opportunity to collaborate with the f2py effort on this. If the f2py maintainers are interested in collaborating on this, I am all for it.