a äx¶cAã@srddlZddlZgd¢ZzddlmZWneyFddlmZYn0dd„Zdd„ZGdd „d ƒZ d d „Z dS) éN)ÚinstallÚ NullFinderÚProtocol)rcCstj |ƒ¡tƒ|S)zÒ Class decorator for installation on sys.meta_path. Adds the backport DistributionFinder to sys.meta_path and attempts to disable the finder functionality of the stdlib DistributionFinder. )ÚsysÚ meta_pathÚappendÚdisable_stdlib_finder)Úcls©r ú>/usr/lib/python3.9/site-packages/importlib_metadata/_compat.pyrsrcCs"dd„}t|tjƒD]}|`qdS)zÀ Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior. cSst|ddƒdkot|dƒS)NÚ __module__Ú_frozen_importlib_externalÚfind_distributions)ÚgetattrÚhasattr)Úfinderr r r Úmatches%sÿþþz&disable_stdlib_finder..matchesN)Úfilterrrr)rrr r r rs rc@s eZdZdZedd„ƒZeZdS)rzj A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. cOsdS)Nr )ÚargsÚkwargsr r r Ú find_spec4szNullFinder.find_specN)Ú__name__r Ú __qualname__Ú__doc__Ú staticmethodrÚ find_moduler r r r r.s rcCst ¡dk}||S)zY Adjust for variable stacklevel on partial under PyPy. Workaround for #327. ZPyPy)ÚplatformZpython_implementation)ÚvalZis_pypyr r r Ú pypy_partialAs r) rrÚ__all__ÚtypingrÚ ImportErrorZtyping_extensionsrrrrr r r r Ús