o $•aã@s¢dZddlZddlmZddlmZmZmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZGd d „d eƒZd e deeeffdd„ZdS)a sphinx.environment.collectors.dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The dependencies collector components for sphinx.environment. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. éN)Úpath)ÚAnyÚDictÚSet)Únodes)Ú relative_path)ÚSphinx)ÚBuildEnvironment)ÚEnvironmentCollector)Ú fs_encodingc @sdeZdZdZdedededdfdd„Zdeded eed eddf d d „Z ded e j ddfdd„Z dS)ÚDependenciesCollectorz.dependencies collector for sphinx.environment.ÚappÚenvÚdocnameÚreturnNcCs|j |d¡dS©N)Ú dependenciesÚpop)Úselfr rr©rúL/usr/lib/python3/dist-packages/sphinx/environment/collectors/dependencies.pyÚ clear_docszDependenciesCollector.clear_docÚdocnamesÚothercCs(|D]}||jvr|j||j|<qdSr)r)rr rrrrrrrÚ merge_others  €þz!DependenciesCollector.merge_otherÚdoctreec Cs~t ¡}t t |j¡d¡}|jj}|sdS|jD]#}t |t ƒr%|  t ¡}t |t t ||¡¡ƒ}|jj|jj |¡qdS)z+Process docutils-generated dependency info.ÚdummyN)ÚosÚgetcwdrÚjoinÚnormpathÚsrcdirÚsettingsÚrecord_dependenciesÚlistÚ isinstanceÚbytesÚdecoder rrrrÚadd)rr rÚcwdÚfrompathÚdepsÚdepÚrelpathrrrÚ process_doc$s   ÿùz!DependenciesCollector.process_doc) Ú__name__Ú __module__Ú __qualname__Ú__doc__rr ÚstrrrrrÚdocumentr.rrrrr s ÿÿ ÿr r rcCs| t¡ddddœS)NÚbuiltinT)ÚversionÚparallel_read_safeÚparallel_write_safe)Úadd_env_collectorr )r rrrÚsetup5s ýr:)r2rrÚtypingrrrÚdocutilsrÚdocutils.utilsrÚsphinx.applicationrÚsphinx.environmentr Úsphinx.environment.collectorsr Úsphinx.util.osutilr r r3r:rrrrÚs