8889841có ™‚Mc@s†ddlmZddlZddlmZddlZddlZejjeƒZ defd„ƒYZ defd„ƒYZ dS(iÿÿÿÿ(tCommandN(tglobt build_doccBsAeZdZd d gZddgZd„Zd„Zd„ZRS( sgenerate the documentationtforcesAforce regeneration even if no reStructuredText files have changedswithout-apidocss2whether to skip the generation of API documentatoncCst|_t|_dS(N(tFalseRtwithout_apidocs(tself((sdoc/common/doctools.pytinitialize_options!s cCsdS(N((R((sdoc/common/doctools.pytfinalize_options%sc sddlm}ddlm‰ddlm}ddlm}ddlm }t j j t ddƒ}t j j t dd ƒ}y‡dd lm‰dd lm‰dd lm‰‡‡‡‡fd †}d)|_i|jjd6|_d|_|jjd|ƒWntk rdGHnX|ddgddƒ}x1tdƒD]#} t j j| ƒdd} |js¥t j j| ƒ s¥t j j| ƒt j j| ƒkrEd| GH|dddd|| | gƒt | ƒ} zO|| ddƒ} |j!d ƒ} | j"d| d!|j#ƒj$dddƒ}Wd| j%ƒXt | d"ƒ} z| j&|ƒWd| j%ƒXqEqEW|j'sypdd#l(m)}t*j+d}d|d$|j#j,dd%d&d'g|j#j,t*j+d)|j)ƒ|t*j+d)Wqtk rýd(GHqXndS(*Niÿÿÿÿ(tpublish_cmdline(traw(trst(t HTMLParser(tTemplateLoadertconfs docutils.inis epydoc.ini(t highlight(tget_lexer_by_name(t HtmlFormatterc sDˆ|dƒ} ˆdj|ƒ| ˆƒƒ} ˆd| ddƒgS(Nis ttformatthtml(tjoin( tnamet argumentstoptionstcontenttlinenotcontent_offsett block_texttstatet state_machinetlexerR(RRRR (sdoc/common/doctools.pyt code_block7siitlanguages code-blocks4Pygments not installed, syntax highlighting disabledtdocs doc/commontvariable_lookuptstricts doc/*.txts.htmlsbuilding documentation file %st writer_nameRtargvs --config=%stencodingsutf-8s template.htmltprojecttw(tclis--top=%ss --no-privates --simple-terms --verboses1epydoc not installed, skipping API documentation.(iii(-t docutils.coreR tdocutils.nodesR tdocutils.parsersR t genshi.inputR tgenshi.templateR tostpathRt TOOLS_DIRtpygmentsRtpygments.lexersRtpygments.formattersRRt directivest unchangedRRtregister_directivet ImportErrorRtsplitextRtexiststgetmtimetopentloadtgeneratet distributiontrendertclosetwriteRtepydocR*tsysR&tpackages(RR R R R t docutils_conft epydoc_confR tloadertsourcetdesttfileobjRttemplatetoutputR*told_argv((RRRR sdoc/common/doctools.pytrun(sl    $            N(sforceNsAforce regeneration even if no reStructuredText files have changed(swithout-apidocsNs2whether to skip the generation of API documentaton( t__name__t __module__t descriptiontNonet user_optionstboolean_optionsRRRP(((sdoc/common/doctools.pyRs    ttest_doccBs/eZdZgZd„Zd„Zd„ZRS(s+test the code examples in the documentationcCsdS(N((R((sdoc/common/doctools.pyRrscCsdS(N((R((sdoc/common/doctools.pyRuscCs=x6tdƒD](}d|GHtj|tdtjƒq WdS(Ns doc/*.txtstesting documentation file %st optionflags(RtdoctestttestfileRtELLIPSIS(Rtfilename((sdoc/common/doctools.pyRPxs (RQRRRSRURRRP(((sdoc/common/doctools.pyRWns   ( t distutils.cmdRRYRR0RER1tdirnamet__file__R2RRW(((sdoc/common/doctools.pyts   W