This is an example of building a model, written in Fortran and wrapped in Python with the babelizer, with the meson-python build system using only a pyproject.toml file for project metadata.
This is a sketch of how to build and install this project with either conda
or pip
.
Create a conda environment from the included environment.yml file and activate it
Build/install the Fortran BMI example
Build/install the project with:
$ make install
Make, CMake, and a Fortran compiler are required.
Create a virtual environment
Install the build system requirements through
pip
:$ pip install meson-python meson ninja cython numpy bmipy
Build/install the Fortran BMI specification (it's not installable through
pip
)Build/install the Fortran BMI example
Build/install the project with:
$ make install
Import the standalone project into a Python session:
>>> import pymt_heatf
Import the pymt component:
>>> from pymt.MODELS import HeatModelF
Try the examples in the examples directory.