Пример #1
0
def generate_doit_standalone(script_name='doit'):
    """create standalone doit script"""

    pkgs = get_required_packages()
    pkgs.append('doit')
    script = generate_script('import doit.__main__', pkgs)
    genscript = py.path.local(script_name)
    genscript.write(script)
    # adds permission owner execute
    genscript.chmod(genscript.stat().mode|stat.S_IXUSR)
    return 0
Пример #2
0
def generate_doit_standalone(script_name='doit'):
    """create standalone doit script"""

    pkgs = get_required_packages()
    pkgs.append('doit')
    script = generate_script(
        'import sys; from doit.doit_cmd import cmd_main; sys.exit(cmd_main(sys.argv[1:]))',
        pkgs,
    )
    genscript = py.path.local(script_name)
    genscript.write(script)
    # adds permission owner execute
    genscript.chmod(genscript.stat().mode | stat.S_IXUSR)
    return 0
Пример #3
0
def generate_doit_standalone(script_name='doit'):
    """create standalone doit script"""

    pkgs = get_required_packages()
    pkgs.append('doit')
    script = generate_script(
        'import sys; from doit.doit_cmd import cmd_main; sys.exit(cmd_main(sys.argv[1:]))',
        pkgs,
        )
    genscript = py.path.local(script_name)
    genscript.write(script)
    # adds permission owner execute
    genscript.chmod(genscript.stat().mode|stat.S_IXUSR)
    return 0