Exemplo n.º 1
0
def build_all():
    if pymake is not None:
        # build all of the applications
        pymake.build_apps()

        # build code json
        pymake.usgs_program_data.export_json(current=True)
Exemplo n.º 2
0
def build_all():
    if pymake is not None:
        # build all of the applications
        pymake.build_apps()

        # build code json
        pymake.usgs_program_data.export_json(current=True)
Exemplo n.º 3
0
def build_all():
    if pymake is not None:
        # build code json
        pymake.usgs_program_data.export_json(current=True, write_markdown=True)

        # build all of the applications
        pymake.build_apps(release_precision=False, verbose=True)
Exemplo n.º 4
0
def test_gnu_make():
    os.makedirs(cpth, exist_ok=True)

    target = "triangle"
    pm = pymake.Pymake(verbose=True)
    pm.makefile = True
    pm.makeclean = True
    pm.cc = "gcc"

    if sys.platform.lower() == "win32":
        target += ".exe"

    # get current directory
    cwd = os.getcwd()

    # change to working directory so triangle download directory is
    # a subdirectory in the working directory
    os.chdir(cpth)

    # build triangle and makefile
    assert (pymake.build_apps(
        target, clean=False,
        pymake_object=pm) == 0), "could not build {}".format(target)

    if os.path.isfile(os.path.join(cpth, "makefile")):
        print("cleaning with GNU make")
        # clean prior to make
        print("clean {} with makefile".format(target))
        success, buff = flopy.run_model(
            "make",
            None,
            cargs="clean",
            model_ws=cpth,
            report=True,
            normal_msg="rm -rf ./triangle",
            silent=False,
        )

        # build triangle with makefile
        if success:
            print("build {} with makefile".format(target))
            success, buff = flopy.run_model(
                "make",
                None,
                model_ws=cpth,
                report=True,
                normal_msg="cc -O2 -o triangle ./obj_temp/triangle.o",
                silent=False,
            )

    # finalize Pymake object
    pm.finalize()

    # return to starting directory
    os.chdir(cwd)

    assert os.path.isfile(os.path.join(
        cpth, target)), "could not build {} with makefile".format(target)

    return
Exemplo n.º 5
0
def compile_code():
    # Remove the existing mfusg directory if it exists
    if os.path.isdir(mflgrpth):
        shutil.rmtree(mflgrpth)

    # compile MODFLOW-LGR
    return pymake.build_apps(
        target, download_dir=dstpth, appdir=dstpth, verbose=True
    )
Exemplo n.º 6
0
def make_mfnwt():
    pymake.build_apps("mfnwt")
Exemplo n.º 7
0
def make_mf2005():
    pymake.build_apps("mf2005", verbose=True)
Exemplo n.º 8
0
def make_mt3dusgs():
    pymake.build_apps("mt3dusgs")
Exemplo n.º 9
0
def make_mp6():
    pymake.build_apps('mp6')
Exemplo n.º 10
0
def make_mfnwt():
    pymake.build_apps('mfnwt')
Exemplo n.º 11
0
def make_vs2dt():
    pymake.build_apps('vs2dt')
Exemplo n.º 12
0
def make_mf2005():
    pymake.build_apps("mf2005")
Exemplo n.º 13
0
def make_mf6():
    pymake.build_apps(['mf6', 'zbud6'])
Exemplo n.º 14
0
def test_build_gridgen():
    pymake.build_apps('gridgen')

    return
Exemplo n.º 15
0
def make_triangle():
    pymake.build_apps('triangle')
Exemplo n.º 16
0
def build_target(target):
    if pymake is not None:
        pymake.build_apps(targets=target)

    return
Exemplo n.º 17
0
def make_app():
    pymake.build_apps(['gsflow'])
Exemplo n.º 18
0
def test_compile(target):
    assert (pymake.build_apps(
        target, download_dir=dstpth, appdir=appdir,
        verbose=True) == 0), "could not compile {}".format(target)
Exemplo n.º 19
0
def make_mt3dms():
    pymake.build_apps('mt3dms')
Exemplo n.º 20
0
def make_mf2000():
    pymake.build_apps('mf2000')
Exemplo n.º 21
0
def make_mfusg():
    pymake.build_apps(["mfusg"])
Exemplo n.º 22
0
def make_app():
    pymake.build_apps(['crt'])
Exemplo n.º 23
0
def make_mp7():
    pymake.build_apps('mp7')
Exemplo n.º 24
0
def make_mt3dms():
    pymake.build_apps("mt3dms")
Exemplo n.º 25
0
def make_mf6beta():
    pymake.build_apps('mf6beta')
Exemplo n.º 26
0
def make_app():
    pymake.build_apps(["gsflow"])
Exemplo n.º 27
0
def make_swtv4():
    pymake.build_apps("swtv4")

    return
Exemplo n.º 28
0
def make_mflgr():
    pymake.build_apps("mflgr")
Exemplo n.º 29
0
def test_build_modflow():
    found = copy_app_in_mfexe('mf2005dbl' + eext)
    if not found:
        pymake.build_apps('mf2005')
    return
Exemplo n.º 30
0
def make_mflgr():
    pymake.build_apps("mflgr", verbose=True)
Exemplo n.º 31
0
def test_build_mfnwt():
    found = copy_app_in_mfexe('mfnwtdbl' + eext)
    if not found:
        pymake.build_apps('mfnwt')
    return
Exemplo n.º 32
0
def build_target(target):
    if pymake is not None:
        pymake.build_apps(targets=target)

    return
Exemplo n.º 33
0
def test_build_usg():
    found = copy_app_in_mfexe('mfusgdbl' + eext)
    if not found:
        pymake.build_apps('mfusg')
Exemplo n.º 34
0
def make_mp7():
    pymake.build_apps("mp7")
Exemplo n.º 35
0
def test_build_lgr():
    found = copy_app_in_mfexe('mflgrdbl' + eext)
    if not found:
        pymake.build_apps('mflgr')
    return
Exemplo n.º 36
0
def make_mflgr():
    pymake.build_apps('mflgr')
Exemplo n.º 37
0
def make_mf2005():
    pymake.build_apps('mf2005')
Exemplo n.º 38
0
def make_app():
    pymake.build_apps(["gsflow"], verbose=True)
Exemplo n.º 39
0
def make_swtv4():
    pymake.build_apps('swtv4')

    return