o La @sddlZddlZgdZzddlmZWney$ ddlmZYnwddZddZGdd d Z Gd d d Z d d Z dS)N)install 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 .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_spec8szNullFinder.find_specN)__name__r __qualname____doc__ staticmethodr find_moduler r r r r2s   rc@s,eZdZdZeedZddZereZ[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)namevalueselfr r make_paramNs z-PyPy_repr.__compat_repr__..make_paramz, z EntryPoint())joinmap_fields)r"r#paramsr r!r __compat_repr__Ms  zPyPy_repr.__compat_repr__N) rr rrrraffectedr)__repr__r r r r rEs rcCstdk}||S)zY Adjust for variable stacklevel on partial under PyPy. Workaround for #327. PyPy)platformpython_implementation)valis_pypyr r r pypy_partialZs r1) rr-__all__typingr ImportErrortyping_extensionsrr rrr1r r r r s