Packaging when using Transonic
We still support Setuptools (examples here) but we now recommend using the Meson build system as in one of our test package. For a clean and quite simple real case (also using PDM and Nox), see what is done for the package Fluidsim (related documentation here).
Meson is a high quality open source build system used in particular for Scipy and
Scikit-image. The data necessary to build the package is staggered in meson.build files
in the different directories of the packages.
There is also a file
meson.optionsdescribing few specific build options (this file in Fluidsim).In the main
meson.buildfile, few variables related to Transonic and Pythran are defined (this file in Fluidsim).In other
meson.buildfiles, we can add a call to Transonic to automatically create backends directories with theirmeson.buildfile.
Tip
To help developers to switch to the Meson build system, Transonic provides
a command to automatically create the different meson.build files. One needs
to give the path of the root directory of the package, for example from the
root directory of the
Fluidfft repository,
one could have used:
transonic-init-meson src/fluidfft
Note that Transonic can use for this step more that one backend with something like
transonic --meson --backend python,pythran,numba operators2d.py operators3d.py
so that one can then choose one of these backend at runtime.