@easy.task<EOL>@easy.cmdopts([<EOL>('<STR_LIT>', '<STR_LIT:d>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT:i>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT:x>', '<STR_LIT>'),<EOL>])<EOL>@support.task_requires("<STR_LIT>")<EOL>def docs():
from epydoc import cli <EOL>easy.path('<STR_LIT>').exists() or easy.path('<STR_LIT>').makedirs()<EOL>docs_dir = easy.options.docs.get('<STR_LIT>', '<STR_LIT>')<EOL>(easy.path(docs_dir) / "<STR_LIT>").exists() and easy.path(docs_dir).rmtree()<EOL>try:<EOL><INDENT>include_names = easy.options.docs.includes<EOL><DEDENT>except AttributeError:<EOL><INDENT>include_names = []<EOL><DEDENT>else:<EOL><INDENT>include_names = include_names.replace('<STR_LIT:U+002C>', '<STR_LIT:U+0020>').split()<EOL><DEDENT>try:<EOL><INDENT>exclude_names = easy.options.docs.excludes<EOL><DEDENT>except AttributeError:<EOL><INDENT>exclude_names = []<EOL><DEDENT>else:<EOL><INDENT>exclude_names = exclude_names.replace('<STR_LIT:U+002C>', '<STR_LIT:U+0020>').split()<EOL><DEDENT>excludes = []<EOL>for pkg in exclude_names:<EOL><INDENT>excludes.append("<STR_LIT>")<EOL>excludes.append('<STR_LIT>' + re.escape(pkg))<EOL><DEDENT>sys_argv = sys.argv<EOL>try:<EOL><INDENT>sys.argv = [<EOL>sys.argv[<NUM_LIT:0>] + "<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", os.path.abspath(docs_dir),<EOL>"<STR_LIT>", "<STR_LIT>" % (easy.options.setup.name, easy.options.setup.version),<EOL>"<STR_LIT>", easy.options.setup.url,<EOL>"<STR_LIT>", "<STR_LIT>",<EOL>] + excludes + support.toplevel_packages() + include_names<EOL>sys.stderr.write("<STR_LIT>" % ("<STR_LIT>".join(sys.argv)))<EOL>cli.cli()<EOL><DEDENT>finally:<EOL><INDENT>sys.argv = sys_argv<EOL><DEDENT>
create documentation