B &`, @svddlZddddgZyddlmZWn ek rDddlmZYnXddZdd ZGd ddZGd ddZ dS) Ninstall NullFinder PyPy_reprProtocol)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_pathappenddisable_stdlib_finder)clsr K/opt/alt/python37/lib/python3.7/site-packages/importlib_metadata/_compat.pyrscCs&dd}xt|tjD]}|`qWdS)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|dddkot|dS)N __module___frozen_importlib_externalfind_distributions)getattrhasattr)finderr r r matches(sz&disable_stdlib_finder..matchesN)filterrrr)rrr r r r s r c@s eZdZdZeddZeZdS)rzj A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. cOsdS)Nr )argskwargsr r r find_spec7szNullFinder.find_specN)__name__r __qualname____doc__ staticmethodr find_moduler r r r r1s c@s,eZdZdZeedZddZer&eZ[dS)rzc Override repr for EntryPoint objects on PyPy to avoid __iter__ access. Ref #97, #102. pypy_version_infocs*fdd}dt|j}d|dS)Ncst|}|d|S)N=)r)namevalue)selfr r make_paramMs z-PyPy_repr.__compat_repr__..make_paramz, z EntryPoint())joinmap_fields)r!r"paramsr )r!r __compat_repr__Ls zPyPy_repr.__compat_repr__N) rr rrrrZaffectedr(__repr__r r r r rDs  ) r__all__typingr ImportErrortyping_extensionsrr rrr r r r s