ã“ReÝã@sxdZddlmZddlmZddlmZmZddl Z Gdd„deƒZ Gdd „d eƒZdS) zy Customized Mixin2to3 support: - adds support for converting doctests This module raises an ImportError on Python 2. é)Ú Mixin2to3)Úlog)ÚRefactoringToolÚget_fixers_from_packageNc@s4eZdZdd„Zdd„Zdd„ZdS)ÚDistutilsRefactoringToolcOstj||ŒdS)N)rÚerror)ÚselfÚmsgÚargsÚkw©r ú‹/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/lib2to3_ex.pyÚ log_errorsz"DistutilsRefactoringTool.log_errorcGstj||ŒdS)N)rÚinfo)rr r r r r Ú log_messagesz$DistutilsRefactoringTool.log_messagecGstj||ŒdS)N)rÚdebug)rr r r r r Ú log_debugsz"DistutilsRefactoringTool.log_debugN)Ú__name__Ú __module__Ú __qualname__rrrr r r r rs   rc@s7eZdZddd„Zdd„Zdd„ZdS) rFcCsœ|jjdk rdS|s dStjddj|ƒƒ|jƒ|jƒ|rˆtjr˜t |j ƒ}|j |ddddƒnt j ||ƒdS)NTzFixing ú ÚwriteZ doctests_only)Ú distributionZuse_2to3rrÚjoinÚ_Mixin2to3__build_fixer_namesÚ_Mixin2to3__exclude_fixersÚ setuptoolsZrun_2to3_on_doctestsrÚ fixer_namesÚrefactorÚ _Mixin2to3Úrun_2to3)rÚfilesZdoctestsÚrr r r r s   zMixin2to3.run_2to3cCsƒ|jr dSg|_x'tjD]}|jjt|ƒƒq W|jjdk rx*|jjD]}|jjt|ƒƒq_WdS)N)rrZlib2to3_fixer_packagesÚextendrrZuse_2to3_fixers)rÚpr r r Z__build_fixer_names.s  zMixin2to3.__build_fixer_namescCskt|dgƒ}|jjdk r7|j|jjƒx-|D]%}||jkr>|jj|ƒq>WdS)NZexclude_fixers)ÚgetattrrZuse_2to3_exclude_fixersr#rÚremove)rZexcluded_fixersZ fixer_namer r r Z__exclude_fixers8s  zMixin2to3.__exclude_fixersN)rrrr rrr r r r rs  r) Ú__doc__Údistutils.utilrrÚ distutilsrÚlib2to3.refactorrrrrr r r r Ús