def compile_check(args):
    path = args.path
    app_path = os.path.abspath(os.path.join(path, 'app'))

    mtimes = get_mtimes(path)
    mtime_fname = os.path.abspath(os.path.join(path, '.modified.json'))
    try:
        old_mtimes = json.load(open(mtime_fname))
    except (IOError, __HOLE__):
        old_mtimes = {}
    if (not os.path.isdir(app_path)
            or mtimes != old_mtimes
            or vars(args).get('recompile')):
        print "--- RECOMPILING before start ---"
        _compile(args)
        mtimes = get_mtimes(path)

    with closing(open(mtime_fname, 'w')) as mtime_file:
        json.dump(mtimes, mtime_file)
dataset/ETHPy150Open ContinuumIO/ashiba/ashiba/main.py/compile_check