This commit is a major change in the way smash is installed.
The smash build system was based on a Makefile, each step of which was independent. Installation was not done directly with the pip install command, but by first compiling the sources and then installing the output python package. Managing a multi-language package, Fortran, C and python, is not particularly practical via a Makefile. To facilitate the build system process, smash is installed using meson.
A number of changes have been made to integrate meson:
a meson.build file in the root folder and smash plus a file for each module containing Fortran sources wrapped in Python (i.e smash/factory/mesh and smash/fcore).
The f90wrap files are now generated using the f90wrap/generate_f90wrap.py script, which generates the files, applies the smash-specific patches and installs them in the desired folder, all cross-platform.
The Makefile has been extensively modified by deleting all the sections linked to the build system. Only the python installation, test launch, documentation generation and adjoint generation sections remain. Important note: the adjoint is not included in the build system process for the moment, as a java dependency has to be implemented.
The use of meson has made it possible to set up an automatic wheels build system via cibuildwheel . Currently, linux x86_64 for different versions of Python (i.e. 3.9, 3.10 and 3.11) is the only platform/architecture available. The build of wheels on windows and macos will come later. Same as the 3.12 python version, waiting for f90wrap to release a new version
The Dockerfile has been updated aswell
The CI has been updated. The unit tests are only performed on ubuntu-latest (i.e. ubuntu-22) for different python version (3.9, 3.10 and 3.11), the code checked only on ubuntu-latest and python 3.11 and the documentation generated only on ubuntu-latestand python 3.11
An upcoming PR will document the entire installation process for users, bearing in mind that once wheels are available, users will be able to pip install directly from PyPi. Probably under the name dasshydro-smash
This commit is a major change in the way smash is installed. The smash build system was based on a
Makefile
, each step of which was independent. Installation was not done directly with the pip install command, but by first compiling the sources and then installing the output python package. Managing a multi-language package, Fortran, C and python, is not particularly practical via aMakefile
. To facilitate the build system process, smash is installed using meson.A number of changes have been made to integrate meson:
a
meson.build
file in the root folder and smash plus a file for each module containing Fortran sources wrapped in Python (i.esmash/factory/mesh
andsmash/fcore
).The f90wrap files are now generated using the
f90wrap/generate_f90wrap.py
script, which generates the files, applies the smash-specific patches and installs them in the desired folder, all cross-platform.The
Makefile
has been extensively modified by deleting all the sections linked to the build system. Only the python installation, test launch, documentation generation and adjoint generation sections remain. Important note: the adjoint is not included in the build system process for the moment, as a java dependency has to be implemented.The use of meson has made it possible to set up an automatic wheels build system via cibuildwheel . Currently,
linux x86_64
for different versions of Python (i.e. 3.9, 3.10 and 3.11) is the only platform/architecture available. The build of wheels on windows and macos will come later. Same as the 3.12 python version, waiting for f90wrap to release a new versionThe
Dockerfile
has been updated aswellThe
CI
has been updated. The unit tests are only performed onubuntu-latest
(i.e.ubuntu-22
) for different python version (3.9, 3.10 and 3.11), the code checked only onubuntu-latest
and python 3.11 and the documentation generated only onubuntu-latest
and python 3.11An upcoming PR will document the entire installation process for users, bearing in mind that once wheels are available, users will be able to pip install directly from PyPi. Probably under the name
dasshydro-smash