pymake.pymake_build_apps module¶
Function to build MODFLOW-based models and other utility software based on
targets defined in the usgsprograms database (usgsprograms.txt). The
usgsprograms database can be queried using functions in the usgsprograms
module. An example of using pymake.build_apps()
to build MODFLOW 6 is:
import pymake
pymake.build_apps(["mf6",])
which will download the latest MODFLOW 6 software release, compile the code,
and delete the downloaded files after successfully building the application.
Multiple applications can be built by adding additional targets to the tuple
in pymake.build_apps()
. For example, MODFLOW 6 and MODFLOW-2005 could
be built by specifying:
import pymake
pymake.build_apps(["mf6","mf2005"]))
Applications are built in the order they are listed in the list. All valid
USGS applications are built if no list is passed to
pymake.build_apps()
.
- build_apps(targets=None, pymake_object=None, download_dir=None, appdir=None, verbose=None, release_precision=True, meson=False, mesondir='.', clean=True)[source]¶
Build all of the current targets or a subset of targets.
- Parameters
targets (str or list of str) – targets to build. If targets is None, all current targets will be build. Default is None
pymake_object (Pymake()) – Pymake object created outside of build_apps
download_dir (str) – download directory path
appdir (str) – target path
release_precision (bool) – boolean indicating if only the release precision version should be build. If release_precision is False, then the release precision version will be compiled along with a double precision version of the program for programs where the standard_switch and double_switch in usgsprograms.txt is True. default is True.
meson (bool) – boolean indicating that the executable should be built using the meson build system. (default is False)
mesondir (str) – Main meson.build file path
clean (bool) – boolean determining of final download should be removed
- Returns
returncode – integer value indicating successful completion (0) or failure (>0)
- Return type
int