Esempio n. 1
0
    subprocess.check_call(["cp", wotmod_dst, dst])


def get_id():
    return "{author}.{name}".format(author=AUTHOR,
                                    name=NAME.lower().replace(" ", "-"))


def get_version():
    tag = subprocess.check_output(["git", "describe", "--tags"]).strip()
    return tag.lstrip("v")


def get_wotmod_name():
    return "{id}_{version}.wotmod".format(id=get_id(), version=get_version())


def get_release_name():
    return "{name}-{version}.zip".format(name=NAME.lower().replace(" ", "-"),
                                         version=get_version())


def get_files(directory):
    for root, _, files in os.walk(directory):
        for file_name in files:
            yield path.join(root, file_name)


if __name__ == "__main__":
    main()
Esempio n. 2
0
def build(mod, params):
    dynamically_loaded_mod = simulate_dynamic_module_load(mod)
    dynamically_loaded_mod.tasks_run = []
    sys.argv = ['pynt', '-f', fpath(mod)] + params
    main()
    return dynamically_loaded_mod
Esempio n. 3
0
def build(mod, params=None, init_mod = reset_build_file):
    dynamically_loaded_mod = simulate_dynamic_module_load(mod)
    dynamically_loaded_mod.tasks_run = []
    sys.argv = ['pynt', '-f', fpath(mod)] + (params or [])
    main()
    return dynamically_loaded_mod
Esempio n. 4
0
def build(mod, params=None, init_mod=reset_build_file):
    dynamically_loaded_mod = simulate_dynamic_module_load(mod)
    dynamically_loaded_mod.tasks_run = []
    sys.argv = ['pynt', '-f', fpath(mod)] + (params or [])
    main()
    return dynamically_loaded_mod