diff --git a/.gitignore b/.gitignore index 66ff0ef..bf2ac97 100644 --- a/.gitignore +++ b/.gitignore @@ -85,4 +85,6 @@ venv/ **/.DS_Store # environment files -**.env \ No newline at end of file +**.env + +.trash/ diff --git a/autotest/test_build.py b/autotest/test_build.py index 1d21e32..fbdbb55 100644 --- a/autotest/test_build.py +++ b/autotest/test_build.py @@ -15,11 +15,14 @@ test_ostag = get_ostag() test_fc_env = os.environ.get("FC") if "win" in test_ostag: - meson_exclude = ("mt3dms", "vs2dt", "triangle", "gridgen", "sutra") + meson_exclude = ["mt3dms", "vs2dt", "triangle", "gridgen", "sutra"] elif "win" not in test_ostag and test_fc_env in ("ifort",): - meson_exclude = ("mf2000", "mf2005", "swtv4", "mflgr", "sutra") + meson_exclude = ["mf2000", "mf2005", "swtv4", "mflgr", "sutra"] else: - meson_exclude = ("sutra",) + meson_exclude = ["sutra"] +if "win" in test_ostag and test_fc_env in ("ifort",): + meson_exclude += ["mf2000", "mf2005", "swtv4", "mflgr"] + targets_meson = [t for t in targets if t not in meson_exclude] make_exclude = ("libmf6", "gridgen", "mf2000", "swtv4", "mflgr") diff --git a/autotest/test_mf6_existing_meson.py b/autotest/test_mf6_existing_meson.py index d84e94c..c3f41e6 100644 --- a/autotest/test_mf6_existing_meson.py +++ b/autotest/test_mf6_existing_meson.py @@ -17,10 +17,10 @@ def targets() -> list[Path]: target = TARGET_NAME ext, shared_ext = get_binary_suffixes() - executables = [target, "zbud6", "mf5to6", "libmf6"] - for idx, _ in enumerate(executables[:3]): + executables = [target, "zbud6", "libmf6"] + for idx, _ in enumerate(executables[:-1]): executables[idx] += ext - executables[3] += shared_ext + executables[-1] += shared_ext return executables diff --git a/pixi.lock b/pixi.lock index d11ac64..2d59db3 100644 --- a/pixi.lock +++ b/pixi.lock @@ -115,7 +115,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/matplotlib-3.10.1-py310hff52083_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.10.1-py310h68603db_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/modflow-devtools-1.6.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mysql-common-9.0.1-h266115a_3.conda @@ -307,7 +307,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libzlib-1.3.1-h86ecc28_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/matplotlib-3.10.1-py310hbbe02a8_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/matplotlib-base-3.10.1-py310h2cc5e2d_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/modflow-devtools-1.6.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/mysql-common-9.0.1-h3f5c77f_3.conda @@ -469,7 +469,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-19.1.6-ha54dae1_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/matplotlib-3.10.1-py310h2ec42d9_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/matplotlib-base-3.10.1-py310h1671ce3_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/modflow-devtools-1.6.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-hf036a51_1.conda @@ -605,7 +605,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-19.1.6-hdb05f8b_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/matplotlib-3.10.1-py310hb6292c7_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/matplotlib-base-3.10.1-py310hadbac3a_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/modflow-devtools-1.6.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.5-h7bae524_1.conda @@ -743,7 +743,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda - conda: https://conda.anaconda.org/conda-forge/win-64/matplotlib-3.10.1-py310h5588dad_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/matplotlib-base-3.10.1-py310h37e0a56_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/mkl-2024.2.2-h66d3029_15.conda - conda: https://conda.anaconda.org/conda-forge/noarch/modflow-devtools-1.6.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 @@ -5060,17 +5060,17 @@ packages: license_family: PSF size: 7168334 timestamp: 1740782095921 -- conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.3.0-pyhd8ed1ab_0.conda - sha256: d9fe5a31b301c662a7410d477257932a76149430acaf760131a35a1476956e96 - md5: 48fa9fd8e4226d71cdbef619f2402572 +- conda: https://conda.anaconda.org/conda-forge/noarch/meson-1.8.0-pyh29332c3_0.conda + sha256: 702c8b92e7d33463b2c3ed226c1d7c3e745d9dedb3d35d0fdca6a47ef32d7e78 + md5: 8e25221b702272394b86b0f4d7217f77 depends: + - python >=3.9 - ninja >=1.8.2 - - python >=3.5.2 - - setuptools + - python license: Apache-2.0 license_family: APACHE - size: 628242 - timestamp: 1700451735019 + size: 726539 + timestamp: 1745942023589 - conda: https://conda.anaconda.org/conda-forge/win-64/mkl-2024.2.2-h66d3029_15.conda sha256: 20e52b0389586d0b914a49cd286c5ccc9c47949bed60ca6df004d1d295f2edbd md5: 302dff2807f2927b3e9e0d19d60121de diff --git a/pixi.toml b/pixi.toml index 1541bba..b39f350 100644 --- a/pixi.toml +++ b/pixi.toml @@ -13,7 +13,7 @@ flaky = "*" flopy = "*" hatchling = ">=1.27.0,<2" matplotlib = "*" -meson = "*" +meson = ">=1.8.0" modflow-devtools = "*" networkx = "*" ninja = "*" diff --git a/pymake/pymake_build_apps.py b/pymake/pymake_build_apps.py index 5a9415c..3a4fe69 100644 --- a/pymake/pymake_build_apps.py +++ b/pymake/pymake_build_apps.py @@ -126,7 +126,7 @@ def build_apps( shutil.rmtree(pth) # set object to clean after each build - pmobj.makeclean = True + pmobj.makeclean = clean # reset variables based on passed args if download_dir is not None: diff --git a/pymake/utils/_compiler_switches.py b/pymake/utils/_compiler_switches.py index 402a038..cbfc7d8 100644 --- a/pymake/utils/_compiler_switches.py +++ b/pymake/utils/_compiler_switches.py @@ -824,7 +824,7 @@ def _set_fflags(target, fc="gfortran", argv=True, osname=None, verbose=False): "-Wunused-label", "-Wunused-variable", "-pedantic", - "-std=f2008", + "-std=f2018", "-Wcharacter-truncation", ] @@ -897,6 +897,10 @@ def _set_cflags(target, cc="gcc", argv=True, osname=None, verbose=False): cflags += ["-lm"] else: cflags += ["-DNO_TIMER"] + elif target == "gridgen": + if osname in ("linux", "darwin"): + if cc.startswith("i"): + cflags += ["-frtti"] # add additional cflags from the command line if argv: diff --git a/pymake/utils/usgsprograms.txt b/pymake/utils/usgsprograms.txt index 44d6766..bdea82a 100644 --- a/pymake/utils/usgsprograms.txt +++ b/pymake/utils/usgsprograms.txt @@ -1,26 +1,26 @@ -target , version , current, url , dirname , srcdir , standard_switch, double_switch, shared_object -mf6 , 6.6.1 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.1/mf6.6.1_linux.zip , mf6.6.1_linux , src , True , False , False -zbud6 , 6.6.1 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.1/mf6.6.1_linux.zip , mf6.6.1_linux , utils/zonebudget/src, True , False , False -libmf6 , 6.6.1 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.1/mf6.6.1_linux.zip , mf6.6.1_linux , srcbmi , True , False , True -mp7 , 7.2.001 , True , https://water.usgs.gov/water-resources/software/MODPATH/modpath_7_2_001.zip , modpath_7_2_001 , source , True , False , False -mt3dms , 5.3.0 , True , https://github.com/MODFLOW-USGS/mt3dms/releases/download/2.0/mt3dms-2.0.zip , mt3dms-2.0 , true-binary , True , False , False -mt3dusgs , 1.1.0 , True , https://water.usgs.gov/water-resources/software/MT3D-USGS/mt3dusgs1.1.0.zip , mt3dusgs1.1.0 , src , True , False , False -vs2dt , 3.3 , True , https://water.usgs.gov/water-resources/software/VS2DI/vs2dt3_3.zip , vs2dt3_3 , include , True , False , False -triangle , 1.6 , True , https://github.com/MODFLOW-USGS/triangle/releases/download/1.0/triangle-1.0.zip , triangle-1.0 , src , True , False , False -gridgen , 1.0.02 , True , https://water.usgs.gov/water-resources/software/GRIDGEN/gridgen.1.0.02.zip , gridgen.1.0.02 , src , True , False , False -crt , 1.3.1 , True , https://water.usgs.gov/ogw/CRT/CRT_1.3.1.zip , CRT_1.3.1 , SOURCE , True , False , False -sutra , 4.0 , True , https://water.usgs.gov/water-resources/software/sutra/4.0/SUTRA_4_0_0.zip , SutraSuite , SUTRA_4_0/source , True , False , False -mf2000 , 1.19.01 , True , https://water.usgs.gov/nrp/gwsoftware/modflow2000/mf2k1_19_01.tar.gz , mf2k.1_19 , src , True , False , False -mf2005 , 1.12.00 , True , https://github.com/MODFLOW-USGS/mf2005/releases/download/v.1.12.00/MF2005.1_12u.zip , MF2005.1_12u , src , True , False , False -mfusg , 1.5 , True , https://water.usgs.gov/water-resources/software/MODFLOW-USG/mfusg1_5.zip , mfusg1_5 , src , True , False , False -zonbudusg , 1.5 , True , https://water.usgs.gov/water-resources/software/MODFLOW-USG/mfusg1_5.zip , mfusg1_5 , src/zonebudusg , True , False , False -swtv4 , 4.00.05 , True , https://water.usgs.gov/water-resources/software/SEAWAT/swt_v4_00_05.zip , swt_v4_00_05 , source , False , True , False -mp6 , 6.0.1 , True , https://water.usgs.gov/water-resources/software/MODPATH/modpath.6_0_01.zip , modpath.6_0 , src , True , False , False -mflgr , 2.0.0 , True , https://water.usgs.gov/ogw/modflow-lgr/modflow-lgr-v2.0.0/mflgrv2_0_00.zip , mflgr.2_0 , src , True , False , False -zonbud3 , 3.01 , True , https://water.usgs.gov/water-resources/software/ZONEBUDGET/zonbud3_01.exe , Zonbud.3_01 , Src , True , False , False -mfnwt1.1.4 , 1.1.4 , False , https://water.usgs.gov/water-resources/software/MODFLOW-NWT/MODFLOW-NWT_1.1.4.zip , MODFLOW-NWT_1.1.4 , src , True , False , False -mfnwt , 1.3.0 , True , https://water.usgs.gov/water-resources/software/MODFLOW-NWT/MODFLOW-NWT_1.3.0.zip , MODFLOW-NWT , src , True , False , False -mfusg_gsi , 2.4.0 , True , https://www.gsienv.com/wp-content/uploads/2024/07/USG-Transport_Version-2.4.0.zip , USGT-v2-4-0-Source , . , True , False , False -mf6dev , 6.7.0.dev1 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , src , True , False , False -zbud6dev , 6.7.0.dev1 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , utils/zonebudget/src, True , False , False -libmf6dev , 6.7.0.dev1 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , srcbmi , True , False , True \ No newline at end of file +target , version , current, url , dirname , srcdir , standard_switch, double_switch, shared_object +mf6 , 6.6.2 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.2/mf6.6.2_linux.zip , mf6.6.2_linux , src , True , False , False +zbud6 , 6.6.2 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.2/mf6.6.2_linux.zip , mf6.6.2_linux , utils/zonebudget/src, True , False , False +libmf6 , 6.6.2 , True , https://github.com/MODFLOW-USGS/modflow6/releases/download/6.6.2/mf6.6.2_linux.zip , mf6.6.2_linux , srcbmi , True , False , True +mp7 , 7.2.001 , True , https://water.usgs.gov/water-resources/software/MODPATH/modpath_7_2_001.zip , modpath_7_2_001 , source , True , False , False +mt3dms , 5.3.0 , True , https://github.com/MODFLOW-USGS/mt3dms/releases/download/2.0/mt3dms-2.0.zip , mt3dms-2.0 , true-binary , True , False , False +mt3dusgs , 1.1.0 , True , https://water.usgs.gov/water-resources/software/MT3D-USGS/mt3dusgs1.1.0.zip , mt3dusgs1.1.0 , src , True , False , False +vs2dt , 3.3 , True , https://water.usgs.gov/water-resources/software/VS2DI/vs2dt3_3.zip , vs2dt3_3 , include , True , False , False +triangle , 1.6 , True , https://github.com/MODFLOW-USGS/triangle/releases/download/1.0/triangle-1.0.zip , triangle-1.0 , src , True , False , False +gridgen , 1.0.02 , True , https://water.usgs.gov/water-resources/software/GRIDGEN/gridgen.1.0.02.zip , gridgen.1.0.02 , src , True , False , False +crt , 1.3.1 , True , https://water.usgs.gov/ogw/CRT/CRT_1.3.1.zip , CRT_1.3.1 , SOURCE , True , False , False +sutra , 4.0 , True , https://water.usgs.gov/water-resources/software/sutra/4.0/SUTRA_4_0_0.zip , SutraSuite , SUTRA_4_0/source , True , False , False +mf2000 , 1.19.01 , True , https://water.usgs.gov/nrp/gwsoftware/modflow2000/mf2k1_19_01.tar.gz , mf2k.1_19 , src , True , False , False +mf2005 , 1.12.00 , True , https://github.com/MODFLOW-USGS/mf2005/releases/download/v.1.12.00/MF2005.1_12u.zip , MF2005.1_12u , src , True , False , False +mfusg , 1.5 , True , https://water.usgs.gov/water-resources/software/MODFLOW-USG/mfusg1_5.zip , mfusg1_5 , src , True , False , False +zonbudusg , 1.5 , True , https://water.usgs.gov/water-resources/software/MODFLOW-USG/mfusg1_5.zip , mfusg1_5 , src/zonebudusg , True , False , False +swtv4 , 4.00.05 , True , https://water.usgs.gov/water-resources/software/SEAWAT/swt_v4_00_05.zip , swt_v4_00_05 , source , False , True , False +mp6 , 6.0.1 , True , https://water.usgs.gov/water-resources/software/MODPATH/modpath.6_0_01.zip , modpath.6_0 , src , True , False , False +mflgr , 2.0.0 , True , https://water.usgs.gov/ogw/modflow-lgr/modflow-lgr-v2.0.0/mflgrv2_0_00.zip , mflgr.2_0 , src , True , False , False +zonbud3 , 3.01 , True , https://water.usgs.gov/water-resources/software/ZONEBUDGET/zonbud3_01.exe , Zonbud.3_01 , Src , True , False , False +mfnwt1.1.4 , 1.1.4 , False , https://water.usgs.gov/water-resources/software/MODFLOW-NWT/MODFLOW-NWT_1.1.4.zip , MODFLOW-NWT_1.1.4 , src , True , False , False +mfnwt , 1.3.0 , True , https://water.usgs.gov/water-resources/software/MODFLOW-NWT/MODFLOW-NWT_1.3.0.zip , MODFLOW-NWT , src , True , False , False +mfusg_gsi , 2.4.0 , True , https://www.gsienv.com/wp-content/uploads/2025/04/USG_T_Version-2.5.0-2.zip , USGT_V2-5-0_Source_Code , . , True , False , False +mf6dev , 6.7.0.dev2 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , src , True , False , False +zbud6dev , 6.7.0.dev2 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , utils/zonebudget/src, True , False , False +libmf6dev , 6.7.0.dev2 , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , srcbmi , True , False , True \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 35ff550..388b936 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "numpy", "requests", "networkx", - "meson", + "meson>=1.8.0", "ninja", "pydotplus", ]