3

T'íc\
ã@s®dZddlmZmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZerhddlmZejeƒZGd	d
„d
ƒZde	dd
œdd„Zdeeefdœdd„ZdS)z Utilities for Sphinx extensions.é)Ú
TYPE_CHECKINGÚAnyÚDict)ÚInvalidVersionÚVersion)ÚConfig)ÚVersionRequirementError)Ú__)Úlogging)ÚSphinxc@s eZdZeeeddœdd„ZdS)Ú	ExtensionN)ÚnameÚmoduleÚkwargsÚreturncKs@||_||_||_|jddƒ|_|jddƒ|_|jddƒ|_dS)NÚversionzunknown versionÚparallel_read_safeÚparallel_write_safeT)r
rÚmetadataÚpoprrr)Úselfr
rr©rú2/tmp/pip-build-gk9425m9/sphinx/sphinx/extension.pyÚ__init__szExtension.__init__)Ú__name__Ú
__module__Ú__qualname__ÚstrrrrrrrrsrrN)ÚappÚconfigrcCs¾|jdkrdSxª|jjƒD]œ\}}|jj|ƒ}|dkrHtjtdƒ|ƒqd}|jdkr\d}n>yt|ƒt|jƒkrtd}Wn"t	k
r˜||jkr”d}YnX|st
tdƒ|||jfƒ‚qWdS)z1Verify the required Sphinx extensions are loaded.NzPThe %s extension is required by needs_extensions settings, but it is not loaded.Tzunknown versionFzvThis project needs the extension %s at least in version %s and therefore cannot be built with the loaded version (%s).)Zneeds_extensionsÚitemsÚ
extensionsÚgetÚloggerÚwarningr	rrrr)rrZextnameZ
reqversionÚ	extensionZ	fulfilledrrrÚverify_needs_extensions$s(




r&)rrcCs|jdtddddddœS)Nz
config-initedi )ÚpriorityÚbuiltinT)rrr)Úconnectr&)rrrrÚsetupBsr*)Ú__doc__ÚtypingrrrZpackaging.versionrrZ
sphinx.configrZ
sphinx.errorsrZ
sphinx.localer	Zsphinx.utilr
Zsphinx.applicationrÚ	getLoggerrr#rr&rr*rrrrÚ<module>s