示例#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)
示例#2
0
文件: buildall.py 项目: wjqiu/pymake
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)
示例#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)
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
示例#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
    )
示例#6
0
def make_mfnwt():
    pymake.build_apps("mfnwt")
示例#7
0
def make_mf2005():
    pymake.build_apps("mf2005", verbose=True)
示例#8
0
def make_mt3dusgs():
    pymake.build_apps("mt3dusgs")
示例#9
0
def make_mp6():
    pymake.build_apps('mp6')
示例#10
0
def make_mfnwt():
    pymake.build_apps('mfnwt')
示例#11
0
def make_vs2dt():
    pymake.build_apps('vs2dt')
示例#12
0
def make_mf2005():
    pymake.build_apps("mf2005")
示例#13
0
def make_mf6():
    pymake.build_apps(['mf6', 'zbud6'])
示例#14
0
def test_build_gridgen():
    pymake.build_apps('gridgen')

    return
示例#15
0
def make_triangle():
    pymake.build_apps('triangle')
示例#16
0
def build_target(target):
    if pymake is not None:
        pymake.build_apps(targets=target)

    return
示例#17
0
def make_app():
    pymake.build_apps(['gsflow'])
示例#18
0
def test_compile(target):
    assert (pymake.build_apps(
        target, download_dir=dstpth, appdir=appdir,
        verbose=True) == 0), "could not compile {}".format(target)
示例#19
0
def make_mt3dms():
    pymake.build_apps('mt3dms')
示例#20
0
def make_mf2000():
    pymake.build_apps('mf2000')
def make_mfusg():
    pymake.build_apps(["mfusg"])
示例#22
0
文件: make_crt.py 项目: wjqiu/pymake
def make_app():
    pymake.build_apps(['crt'])
示例#23
0
def make_mp7():
    pymake.build_apps('mp7')
def make_mt3dms():
    pymake.build_apps("mt3dms")
示例#25
0
def make_mf6beta():
    pymake.build_apps('mf6beta')
示例#26
0
def make_app():
    pymake.build_apps(["gsflow"])
示例#27
0
def make_swtv4():
    pymake.build_apps("swtv4")

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

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

    return