csdms / babelizer

Transform BMI-wrapped models into Python packages
https://babelizer.readthedocs.io
MIT License
4 stars 3 forks source link

Use Meson to build all babelized projects #87

Closed mdpiper closed 4 months ago

mdpiper commented 8 months ago

Currently, we use setuptools (C, C++, Python) and numpy.distutils (Fortran) to build babelized projects. With numpy.distutils being removed in Python 3.12, we need a different build system for Fortran projects (see #77). Meson, along with meson-python, was suggested as an alternative.

To keep things as simple as possible in the babelizer, it would be ideal to use the same build system for all babelized projects. Meson (and meson-python) can build C, C++, Fortran, Python, and Java projects, using a configuration file that can be templated.

mdpiper commented 8 months ago

I've successfully built a Fortran project, the babelized version of the heat model from bmi-example-fortran, using meson-python. I've also built the analogous C project. The results are here:

Meson (and meson-python) worked great!

aufdenkampe commented 4 months ago

@mdpiper, this is exciting to see. When might you move forward with this for a future release?

@Volk3rJ, @ptomasula, and I are exploring how we might move forward with using Babelizer for our new BMI wrapping & coupling work that I mentioned in https://github.com/csdms/pymt/issues/166

mdpiper commented 4 months ago

Hi @aufdenkampe -- I'd love to get this done soon, but scheduling is a problem. I talked with @mcflugen last week and this fits with his push to get our Workbench tools up to date. Maybe the first half of March?

aufdenkampe commented 4 months ago

@mdpiper, that's great to hear that you might be able to get this done in the next few weeks! Thanks for the update!

mdpiper commented 4 months ago

@aufdenkampe If it would help, if you watch this repository (clicking the Watch button on https://github.com/csdms/babelizer) you'll get email updates whenever a new issue or PR is made so you can track our progress.